Ammonia poisioning is a good guess- i have gotten bettas from petco and the ammonia from their cups that was over an 8.0
There is no actual cure for it that I am aware of but depending on the extent of the damage they can lead a fairly normal life. If he is active and eating, those are very good signs.
I would keep him in a dark, quite area for now and just keep an eye on him and watch for any other symptoms - he may have some other issue that has not made itself known yet.
Clean water and AQ salt is probably the best course of action. I have also been told Amquel plus helps somehow.
Symptoms:
- Fish gasp for breath at the water surface
- Purple or red gills
- Fish is lethargic
- Loss of appetite
- Fish lays at the bottom of the tank
- Red streaking on the fins or body
He may also just be really stressed out. Do you have a plant or something to put in there for him? Maybe one of those hideously bright colored caves walmart sells?