I agree with Devs, most health problems are usually to do with water quality and this sounds like it is too.
If your tank has been filtered for some time, it should be cycled, so you shouldn't really be getting ammonia readings unless there is a problem.
You say it is a divided tank 10 gal, how many other fish share the tank and are any of those also unwell?
For your nitrAtes to get up as high as 40 in a betta tank and getting ammonia readings, I think maybe you are either overfeeding, or the tank is overstocked or you need to to be doing more frequent, regular partial water changes on at least a weekly basis.
For now, as Devs says, try to get a full test kit so you can assess exactly what is going on with the water quality on a daily basis.
Try to keep nitrAtes down to a minimium. So for now, guided by your test kit results, you may need to do water changes every couple of days to get things back on track. With good water quality he should start to improve. I would also feed more sparingly for now.
When you say the fin ends are a rusty red colour, it sounds like blood streaks so it could be the start of a bacterial problem as well. Other than that and colour loss and lethargy are there any other symptoms?