Ants are outdoor creatures -- in theory, anyway. If you keep your pet indoors, they're a lot less likely to encounter the little six-legged fellows. Of course, not all pets like to stay indoors and many people prefer to let their cats and dogs hang out in the backyard. We won't make any judgments about that, but if you have a backyard pet, you might want to regularly police the yard for ant mounds and eradicate them when you find them. Poisons are available for exterminating ants or you can just call an exterminator. Just be sure that whatever process you use is pet-safe.
If fire ants should get on your outdoor pet (and you'll probably be alerted to this by loud noises of pain), remove them by hand or brush, not by hosing down your pet. Water just makes the ants angrier. (And wear gloves so that the ants don't get to you too.)