This is actually for a worldbuilding project, but I thought I'd just ask it here as it is solely about biology.
Anyway, would it be possible for a herbivore, let's call him X, that is predated by a predator, or Y, to evolve to become a specialized hunter of Y? For example, wolves hunt deer. Imagine that in millions of years, the deer has evolved into the main predator of wolves.
If that's not possible, is it at least possible for X to evolve adaptations for fighting/killing Y (Not for food)?
If you require any further context or clarification, please let me know.