Your teacher might have been teasing you. Or, he may have been hungry for fungus, which is what an agaric is — a mushroom that grows naturally in the woods.
When I complained about our cafeteria food, my biology teacher told me he wished they'd serve agarics. Was he talking about some kind of dessert?
Some members of the Agaricaceae family of fungi are safe for eating (and quite sought after when they're in season). Other agarics — identifiable by their umbrella-like appearance, with gills where spokes would be — are poisonous. Dried forms of some of these mushrooms were once used as medical treatments for diseases and symptoms, such as the heavy sweating associated with tuberculosis.
In "Gareth and Lynette," from his collection of Idylls of the King narrative poems, Alfred, Lord Tennyson writes,
That smells a foul-fleshed agaric in the holt,
And deems it carrion of some woodland thing . . .
And from Leo Tolstoy's Anna Karenina:
The feeling of happiness in being near her continually grew, and at last reached such a point that, as he put a huge, slender-stalked agaric fungus in her basket, he looked straight into her face, and noticing the flush of glad and alarmed excitement that overspread her face . . .