Stop feeding for a few days.
Dose with Epsom salt at 1 tablespoons per 5 gallons.
Keep nitrates below 10ppm with frequent water changes.
I would dose with API General Cure (or another medication containing metronidazole & praziquantel).
With a prolapsed anus, you need to change the foods to something that’s more digestible as that’s what’s typically causing the problem. Tetra is loaded with fillers so I would look at Northfin or New Life Spectrum as to what foods fits what you’re needing. I’d also stay away from foods that contain Chitin until he’s back to normal.