Salt might be a good thing to try for a sick fish. It is often a much safer option than medications or water treatments. That being said, salt only is effective on certain illnesses, usually external problems. Ich for example can be cured by salt. Its very important that the fish you use it on will tolerate salt. Scaleless fish like plecos are not tolerant to salt from what I know. Goldfish on the other hand are. I had a Ich breakout in my tank a few months ago and I added the approriate amount of salt and the outbreak was gone in a few days. No costly medication needed and no added chemicals to stress the fish. Some people will use salt at all times in their freshwater tanks to prevent illness, but that probably isn't necessary.
One option: If you want to treat a fish with Ich or some other problem that might be cured with salt, you can always give the fish a salt bath. This is when you take your fish out of its tank and put it in a container of water with a fairly high amount of salt in it, only for about 15-20 minutes. Baths can be stressful for the fish but at least you can treat just the one fish instead of dosing the entire tank. You can do the same with other medications, just make sure to ask someone (not me, haha) how to do it.