Once ants get indoors, plastic ant traps are available that contain a bait to lure the ants inside, where they eat a poison that isn't accessible to pets, children, overly curious adults, etc. Then they go off and die. But if the ants are still determined to make a -- you should excuse the expression -- beeline to your pet's bowl, you can literally throw them off the scent. When ants find a source of food, they lay down a trail of formic acid leading to the source. The formic acid is pretty much invisible to human beings, but to other ants it's like a road sign saying "Good eats this way!" You know there's a formic acid trail in your house if you see a large number of ants following exactly the same path along walls and ceilings -- a path that usually terminates at a food source.
So beat the ants at their own game. Scrub down the trail with soap and water to remove the formic acid trail. For extra ant confusion, take a little vinegar, which contains acid of its own, and coat the ant path with it. This renders any remaining formic acid difficult for the ants to detect and they'll no longer be able to find the source of the food. With luck, maybe they'll decide to move to the neighbor's house.