There are really quite a few pets a person can, and should have if they live on an farm, or even if they live in the country. Most people of course think of the dog as a very important animal to have if they are on a farm. I, personally, do not have a dog, and have not included them in this list, I have included an alternate animal to the traditional dog. That animal is the Donkey.
Donkey

Image Source
These are wonderful animals often kept for guard purposes. Donkeys do not like dogs, as such they will protect your farm and farm animals against coyotes and stray dogs. They will get used to your own dog if you have one. Some people also use donkeys in orchards to chase off human intruders. Donkeys are personable and will become your best friend in no time, especially if you offer them treats. Somebody asked me recently "What is the best thing you have ever bought for yourself?". My answer was "A donkey.". In all seriousness it is one thing I never thought I would own, never thought I would want, but am totally thrilled with. Our donkey is absolutely wonderful.
Well Cared for Farm Cat
Not just a "Barn cat" who receives no love and attention, but a friendly, cared for farm cat. A good farm cat is spayed or neutered, receives regular veterinary attention, and is fed. Most people do not realize a well fed cat is actually a better mouser. Any cat who is a mouser will be exposed to worms, which is why it is important for them to be cared for regularly by a veterinarian. They should be tame and friendly so that they are easy for you, and your family to handle when it is needed. Spaying or neutering is one of the most important things any owner can do for their pet. Cats should have shelter at night, winter, or in bad weather, ideally this would mean them coming into your house, but a warm barn is good providing there is an area for them. They must have access to fresh water.Chickens

Image Source
I keep chickens as pets. You would be amazed at how friendly they are. Every morning as I make my way out to the barn they cluck softly when they see me, getting louder as I approach, urging me to give them some chicken scratch. They also love it if I bring them some treats, such as a banana or tomato. I only have hens, and collect their eggs twice a day. If you do not have a rooster the eggs are not fertile. We keep four hens and have a surplus of eggs which we give away. We have a large hen house for them, which was an old shed. They have a large fenced run where they can get out and eat the grass, dandelions and look for bugs. Some people would not consider this to be truly "Free Range" but they are safe and have an excellent amount of space in the pet. They always have water and can go into the shed if they want.
Why no Dogs? For me a dog is too much work. I have spent many years working at animal shelters were people dumped dogs they got as cute puppies but ran out of time for. The dogs, being semi-neglected, became bored and destructive. I know for myself, that a dog would not fit my lifestyle. It would perhaps become a chaser of our pet sheep, or go after the hens as it looked for something to do. I sometimes am tired at the end of a long day, and the cats jumping on my lap are annoying enough, but when a dog needs attention, it demands it in a way much unlike a cat. I find dogs are too needy for me. This is not to say that many people do not have wonderful relationships with their dogs. I am thrilled at those who do.