Not quite what it sounds like, but close
Castoreum is a yellowish secretion produced in the castor sacs of the North American beaver, located near, but distinct from, the animal's anal glands, and mixed with its urine during scent-marking. Perfumers have used it for centuries as a fixative and for its warm, leathery, faintly animalic character in oriental and leather-genre fragrances.
Yes, it was really in food
Both the FDA and the Flavor and Extract Manufacturers Association classify castoreum extract as Generally Recognized As Safe, and it was historically used as a flavor enhancer for vanilla, raspberry, and strawberry flavorings in products like ice cream and gelatin. It never became a major food ingredient, though, harvesting it is difficult and expensive, and virtually all vanilla-flavored food today uses real vanilla extract or synthetic vanillin instead.
Where it survives
Castoreum's real remaining market is fragrance, not food, where it's still used, often now replaced by synthetic substitutes, as a fixative in soaps, creams, and leather-accord perfumes.