yes; some plants have long since been identified as pest deterrents, and form the basis of commercial products still; others are newly being identified. See e.g. Organic parasite control for poultry and rabbits in British Columbia, Canada (2011) https://pmc.ncbi.nlm.nih.gov/articles/PMC3143080/is it possible they are rolling in the herbs as a mite deterrent?
So-called sunbathing is about parasite control on feathers too.