I didn't watch it, but apparently this happened in Tangled.
So, here's the best answer I can give.
Horses have a fantastic sense of smell. If a horse comes across a pile of manure, they will try to sniff it, and I suspect they can identify who "dropped" the poop that way. They can certainly identify predators. As for following a trail - I've never seen it, but I've heard anecdotes that some horses will. As horses are grazing animals, they have no "need" for the skill of tracking, but they do need to be able to identify what they're smelling. And horses do like to get the scent of a new person much like dogs do.
So the answer is: They can, but seldom actually do.