andywg put it nicely. When using salt, it doesn't matter whether a fish has scales or not, but whether it's physiology will deal with salt. Yes, osmoregulation is the issue. Osmoregulation is how a fish (or a human for that matter) balances the amount of salt and water in its tissues. Freshwater fish need to pump out water that seeps in while conserving salt that tends to leak out. Seawater fish do the opposite, having to get rid of unwanted salt while conserving water. Brackish water fish (like mollies and scats) can do both as required, and hence can live in fresh and salt water.
If a fish cannot osmoregulate, it will either deydrate (if in the sea) or effectively drown (if in freshwater).
The idea that having scales is something to do with this is a total myth that has nothing to do with the science. There are fish without scales that live in the sea (marine catfish, eels, pufferfish, triggerfish) and fish with scales that live in freshwater (tetras, carps, cichlids). Freshwater fish that have evolved from marine ancestors -- cichlids and livebearers for example -- usually have a high tolerance for salty water because they still have some of the "hardware" in their bodies even if they don't use it normally. There are exceptions though, and both softwater cichlids (like discus) and African Rift Valley cichlids (like mbuna) don't tolerate salt at all well because they have become highly specialised to specific water conditions. On the other hand, some cichlids can live and breed in sea water.
So, before adding salt, the question to ask is "Do I have primary or secondary freshwater fish". If the answer is secondary freshwater fish, adding salt is usually fine. Primary freshwater fish -- characins, carps, gouramis, loaches, and most catfish -- will not tolerate salt well and there is no real reason to add salt to aquaria containing these fish, at least not on a permanent basis. For dips or occasional treatments, it may have some value, but read a good fish health book first, before simply dumping the salt into the tank, regardless of what it says on the box.
Cheers,
Neale
I didn't know that, thanks. I had read (on here!) that salt couldn't be used with scaleless fish. I'd also read that continued use could lead to kidney faliure, is that what osmoregulation means?!