Absolutely, they can mean a group of people, a group of animals, a mixed group of animals and people, a bunch of inanimate objects, and more.
He looked at the knives on the table. They all had wear marks.
The farmer was leading a small flock of sheep, and Protagonist watched as they headed down the road.
I wouldn't use it for "Steve has a car and is driving it here. They should arrive in 10 minutes or so" where they means Steve and the car. But I might for Steve and his broadsword who have had a lot of adventures together. It's completely correct for the rider and horse who, together, have not encountered any predators.
There is a slight nuance: by narrating the horse and person as they the horse matters a bit more. You would also be correct to ignore the horse and just say of the rider "he hadn't encountered ...". Choosing they doesn't ignore the horse the way you might ignore a car, or the hero's boots, or whatever. It's a choice.
Original answer, on referring to a single animal as "they":
If you are narrating something close to the protagonists thoughts, and the protagonist knows the animal's gender, then no, don't use they.
He rode through the jungle, glad of the extra protection of the horse. Her sure feet found a way along paths he could barely see.
(I've noticed it's quite common for our brave young man to find a mare or filly for these adventures, probably because it's less confusing when there are two different pronouns in the narration.) Also specifically for horses and farm animals, you get subcategories of gender all the time. A mare has had a foal, a filly hasn't. Males might be stallions or geldings. The idea that someone would be riding a genderless horse? Maybe if they were blindfolded, in which case knowing nothing about the animal would be a big part of the scene you're setting.
If the protagonist doesn't know, then usually it is more common for animals, and they for people.
The stranger, with glittering silver chains draped around their body, was also riding a horse, with ribbons tied in its mane.
If the creature either doesn't have a binary gender (sci fi or fantasy) or it's just not something people normally know about a creature, then you're going to have to address it in dialog. People give genders to cars and boats and tools so they will probably give some to their trained fire ants.
"I'll treat him well", he promised, then paused. "He? She? Is this --?"
The vendor laughed. "One you don't know, you can call it. But that would be rude for your own. Treat them well, and they'll treat you well. This one, their favourite snack is dried fruit. You get some, you be sure to share with them."
The extra sentences are to make it clear the vendor isn't referring to plural animals, like saying "if you treat dogs fairly they respond well." (And can set up something with dried fruit later.) You can probably be smoother than that.