While speculative, it is reasonable to position the occasional use of proto-medicine as emerging in the great apes sometime around 18 million years ago. Modern orangutans, apes, and chimpanzees treat wounds, digestive issues, and even use insect repellant. The Great Apes LCA lived around 18 million years ago, so using the Occam Approach, this implies that’s around the time such traits emerged. This demonstration of chronoception, a sense of time, is interesting.
This, of course, is only a guess as dog’s and cat’s, which evolved much earlier, frequently eat specific plants to settle their stomach. Some insects, like Ants, use plant extracts to treat fungal infections in their colonies. While the dog and cat example is likely an example of convergent evolution, the ant example for sure is.