"They do not like horses."
Yes, it is 100% necessary. In Spanish, if the object of a verb is a person (or people), you must put an "a" before it. For example, to say "I see Luis", you say "Yo veo a Luis". This "a" should not be put there when the object is a thing. For example "I see the chair" is "Yo veo la silla".