This is the behaviour of animals self-medicating by selecting and ingesting or topically applying what they need to treat or prevent disease.
Cindy Engel wrote the book Wild Health: How Animals Keep Themselves Well and What We Can Learn from Them., and prior academic works. An obvious example of zoopharmacognosy is when dogs eat grass to induce vomiting. However, the behaviour is much more diverse than this with ingestion of items such as clay, charcoal and plants to treat parasites, infestation or poisons.
Practitioners and Training:
Caroline Ingraham: http://www.ingraham.co.uk/
Animals First and Foremost (Kent): http://www.holisticanimalhealing.co.uk/
My Animal Matters (Oxfordshire): https://www.myanimalmatters.co.uk/
Naturally Animals: https://www.naturallyanimals.co.uk/
Such an interesting subject that we have all seen for ourselves in obvious ways and maybe we would see far more if we observe and are more conscious in how our dogs behave.