Hi XXXXXXXXXX~
It does, indeed, sound like your dog has an ear infection.
Unfortunately, there's not much you can do for him until a vet determines which type of infection he has (bacterial vs yeast).
For tonight, the best thing you can do is to keep the ears cleaned out (wiping them with the paper towel will be okay) and try to keep him from scratching. If he seems terribly uncomfortable, you could give him 1 baby aspirin (ONLY baby aspirin...we never use products containing acetaminophen or ibuprofen as even in small amounts they can damage the kidneys and liver), but try to give it with some food to avoid upsetting his stomach. You can give the aspirin once every 12 hours so or, but don't give it for more than 2 days without talking to your vet.
First thing in the morning, give your vet a call. They'll want to see the dog to do an ear cytology to diagnose which type of infection he has. Then they'll be able to send out the proper medication (likely both aural and oral antibiotics).
I hope this helps.
Certified Veterinary Technician
Associates Degree in Veterinary Technology. State and Nationally certified.