What type of fish? Tank size? Parameters?
Plain NaCl (sodium chloride) can be used to treat ich in fish that are tolerant of high salinity. Scaleless fish, sensitive fish (among others), plants or inverts will not tolerate the level of salinity necessary to treat ich. Table salt contains both iodine and anti-caking agents (not healthy for fish). Epsom salt (MgSO4) or magnesium sulfate is a very different chemical than NaCl and will not address ich. Some more information will help!