You will need to treat the whole tank: the medication can only kill the parasite when it is in the free swimming stage (so is in the water, not on the fish). Do be aware that some species can not handle whitespot medication or salt, so check if all of yours can.