Edit-This may sound weird, but bear w/me: can he swim down? Sometimes bettas will appear to be spending an abnormally long amount of time @ the surface & it's not until you see them try to swim down that you realize they can't or can't w/o a lot of difficulty. If this is the case, it's still SB. If he can my guess is it's a cold water or water change change frequency issue. And if he was just scaring you w/o reason, then I'm glad that's all it is!
1) Food: Their stomach is the size of their eye so feed 2-3 pieces of food/day & fast 1 day/wk. Flakes, pellets & freeze dried food have lots of filler they can't digest that can cause bloating issues in sensitive & old bettas. If you feed pellets soak them in water before feeding or they'll expand in his stomach & can cause digestive issues. Frozen foods like brine shrimp, bloodworms, mosquito larvae & glassworms are much more nutritious & easier to digest. & are @ Petco/PetSmart, for $4-5/slab/bubble pack. And yes, get rid of the feeding ring: it's liekly either polluting his water & making him ill or affecting his SB or he's overeating, which is also an SB cause.
2) Constipation: Get a frozen pea (w/o salt as an ingredient since it retains water), put it in a cup w/water, microwave it for 2 min., deshell it, then feed some of the innards on a toothpick. If she's better a few hours to a day later she was constipated.
3) Bettas are tropical fish & need water @ a steady 78 degrees. Cooler temps. cause color loss, clamped fins, lethargy, digestive issues, loss of appetite, stress, illness &/or death. 1-gallon (7.5 or 10 watt heater @ PetSmart and PetCo), 2.5-3 gallons: 25 watt heater (@ most pet stores), 5 gallons: 50 watt heater (@ most pet stores).
4) Water changes remove ammonia, which is toxic & forms in water from uneaten food, waste, his breathing. It's colorless & odorless so you can't tell if the water's ok by seeing if it "looks clean." For uncycled 100% water change tanks: 1 gallon: change 100% of the water (& rinse off plants, gravel, take the fish out, etc.) every other day; 2.5-3 gallons 2-3 times/week; 5 gallons 1-2 x's/week. Many people say not to change all the water but w/uncycled tanks you MUST; otherwise the toxic ammonia levels continually rise; since you're leaving some water in @/every water change the % of ammonia in the water also rises each time. Any Ammonia is enough to stress, sicken or kill fish, so none is the only ok amount. If it's cycled, change 10-25% of the water (the exact amount is determined by your tank's water test kit results) & vacuum 1/3 of the gravel 1x/week.
5) Some develop it @ the end of their lifespan.
6) SB can be caused by bacteria due to cold or bad water quality. Kanaplex/Kanamycin is best for infections & easiest on fish so order it online (Ebay's less $ but ask about exp. date before ordering). For now get Jungle Fungus Eliminator or Clear @ PetCo/PetSmart. If you can't find either get Maracyn 1 and 2 (yes, both, since each only treats one type of infection) @ any pet store. Maracyns are recommended least because they've been so overused they often don't treat current infections. Do a 100% water change before adding the med if his tank is not cycled; if it's cycled take out the carbon since its removes meds & do a 10-25% water change (the amt. you change weekly). Treat daily for 3 days (do a 100% water change each day before adding meds for uncycled tanks; follow package instructions for cycled tanks). Retreat if necessary for another 3 days. Wait 20 minutes after doing a water change before adding meds, sooner dilutes them.
SB can be permanent. If it is, he's not in pain or suffering even if it bothers you & it won't kill him. It's unpredictable: he may have a few good days/week or a few good hours/day or have it for good. Make sure you have a few items she can anchor herself under if he wants so he can feel secure even if he can't really swim.
I'm not an expert but have been rescuing sick, injured, old, handicapped bettas from Wal-Mart, PetSmart, etc. for five years. Because most vets don't do much with fish I had to learn through research & experience. I've gotten pretty good at diagnosing things because I've seen most betta health issues at this point.