Diet of free-range herbivores
One key nutrient worth thinking about in the context of this question is vitamin B12. Herbivores such as cows and sheep will derive this directly from the bacteria in their rumen. Rabbits produce two types of feces - soft and hard - and they eat the soft variety, rich in gut bacteria, as a source of nutrients like vitamin B12. Gorillas are primarily herbivores, but are thought to derive their vitamin B12 from insects, eaten purposefully or inadvertently.

So yes, herbivores derive this particular nutrient from non-plant sources.