Hey Gabby,
One of the shortest paths to achieve this would go something like this:
Small animal metabolizing, carbon dioxide is a waste product in the creation of glucose in animals -> Small animal exhales carbon dioxide -> Plant takes in carbon dioxide through aerobic respiration, carbon incorporate in plant body -> vegetarian eats plant
Here's the trick, plants do NOT get carbon from the soil. So saying the small animal decomposes into soil, and the plant takes it from the soil, is incorrect.
Hope this helps!
Sam