I would suggest cleaning up the water is step 1. 10in fish in 50g, and lacking water changes is likely a big contributor to the problem. Meds are less, sometimes not effective in iffy water parameters. You want to drive nitrate under 10ppm. You incoming test kit will give you an indicator of how much/how often to change water, but right away I would do 50%every 2-3 days.