its always better to treat fish in quarantine/hospital tank separately, the other fish dont bother them , keep them less stressed and you dont have to flush medicine in entire tank if its specific treatment.
I am not sure bout contagious part regarding tail-rot/cataract, but if your tank-water is really bad, same things might happen to other fish with less tolerance to bad-water and remember it lowers their life even if they dont get infected. always better to keep clean-healthy tank.