He is extremely thin. For reference, a fish in good weight looks like the photo below. A smooth, even transition from head to base of caudal.
10-12 pellets per day are fine if evenly spread over several meals. Three pellets 4 x per day would work.
The important thing is to get him eating. Frozen Bloodworms (not freeze dried) are fatty and as such not good as a staple. However, as ailing Betta with poor appetite are an exception. If he were mine I would feed him a 1-2 Bloodworms 2 x per day and two meals of three pellets. If he won't eat the pellets but will eat the Bloodworms, add a second frozen food. Mine like Brine Shrimp. I prefer cubes to slabs. Shave a bit off, return rest to freezer and store leftovers in a small pill bottle n the refrigerator for no more than three days.
Hoping getting some food into him and his weight up will help him start recovering.
I believe it's part of his color fade. Take weekly photos from above so you can chart his progress. I'd still add frozen Bloodworms to his diet to help jump start weight gain. He may be swimming funny because of a loss of muscle mass.
It probably would hurt to dose him with API General Cure should he have an internal parasite.
What all have you done? The Aquarium Salt and Bettafix wouldn't hurt him; neither would the IAL. Bettafix, however, is very mild; more like giving someone aspirin who has a migraine. Some claim the "fix" meds are harmful to labyrinth fish because they contain oil which coats the labyrinth organ. However, the oils have been refined to be water soluble and all reports of damage seem to be anecdotal Melafix Dangers; Betta, Labyrinth Fish, Pencil Fish.
Lack of nutrition often impacts internal organs, brings loss of muscle and causes stress which impacts the immune system. The longer treatment is delayed the less chance there is for recovery. All one can do hope it's not too late and try to get weight on the Betta so it has reserves to fight whatever else might be going on..
Don't forget you only dose General Cure again after 48 hours.
I don't see why you couldn't use an air stone as long as it's on pretty low.
The parameters you posted are good. Under 15 ppm Nitrates is better and 10 ppm is best. However, 20 isn't going to cause any issues. Everything I've researched indicates fish must be exposed to high Nitrates for weeks for them to have an impact.So please don't blame or second-guess yourself.
Sadly, we can't see the internal damage that occurs when fish do not get proper nutrition. I'm afraid this may be the case with your boy. I found a study which reported something I didn't know: They lose the feeding reaction.
Once reason I suggested the General Cure is internal parasites can cause weight loss.
I'm worried this may be the end of life. All you can do is keep trying.