Poor little guy. Probably hurts. I would go to google.com and look up naturopathic cures for ant bites on puppies. It will tell you what to put on it. Some people medicines are ok for dogs others can kill it. Like dogs can't eat grapes or tomatoes because their livers can't process them so it causes liver failure or damage and will hurt them a lot. So google, then naturo pathic cures for bug bites. Maybe something simple like toothpaste or neo sporin or vaseline would be fine. I would look it up and read about it to be sure. Ok.
Keep him away from the ants and whenever my dads dogs get fleas bad and they bite at themselves badly, he rubs vaseline on them to soothe the pain!