Sorry your betta isn't well.
I don't have any experience with what you describe, but I suggest water changes, water changes, and more water changes!
Keeping ammonia and nitrites in check is going to be very important -- good water quality will help your betta's immune system fight off whatever is ailing it.
Since you stated that the 1 gallon isn't ideal, I'm guessing you know that it is very hard to maintain good water quality in that small of a volume of water.
I don't understand your circumstances, so this isn't a criticism in any way, but just some advice.
In my opinion, were it me, in one gallon, I'd do 50% water changes daily as a matter of routine. Pollutants can build up very quickly in that volume of water -- and as soon as I could, I'd try to upgrade to a 5 gallon filtered and heated tank -- or as close to that as I could manage.
Best of luck and I hope your betta improves!