Your biggest problem is not being able to see a vet. This happens to often with pets that only cost a couple of bucks.
A anole will "Gape" for a couple of reasons (these are the most common) 1)vomiting. Did you see anything discharge from the mouth? 2) Overheated. The reason they "Gape" when hot is to release heat. That it happened right after medicine though so he may have been trying to vomit it up, and if you did not see anything come up, was unsucesfull.
I really would not worry about it to much though unless it keeps happening. A one time occurence could be just trying to throw up the medicine, or a temporary overheating. IF IT HAPPENS MORE, then you are going to have to find out who bought the anole, and tell them to pony up the money for a vet visit.

