A broad spectrum fish medication that treats bacteria, fungus and protozoan infections, might treat the bacterial infection. But if the fish has stopped eating, it's usually too late to treat it.
If a broad spectrum fish medication does not work, then you need anti-biotics, which often require a vet to prescribe them.
----------------------
Dechlorinators will neutralise chlorine/ chloramine as soon as they come in contact with each other. However, it can take some time for the dechlorinator to come in contact with all the chlorine/ chloramine molecules in the water. Aerating the water and dechlorinator for at least 5 minutes will normally allow all the chlorine/ chloramine to be neutralised.
Aerating the tap water also helps get the dissolved gasses in the water back to normal levels. It's best to aerate new tap water for 30 minutes or more to allow the gasses to get back to normal.
I recommend making up the new water before doing the water change. That way the dechlorinator can neutralise the chlorine/ chloramine, and the dissolved gasses can stabilise while you gravel clean and drain the tank.
Basically you get a fish bucket and add dechlorinator, fill with tap water. Add an airstone and let it bubble away. Then use another bucket to do the gravel cleaning and draining the water out. Then add the dechlorinated water to fill the tank back up.