Deworming medications are normally quite safe and have few, if any side effects. However, if the fish have been treated with other harsher chemicals (Malachite green, formaldehyde, etc), then give them a few weeks before trying a dewormer.
In the mean time, if you suspect the fish have intestinal worms and the tank has an established filter, feed the fish more often. Feeding them 3-5 times a day will provide the fish with more food to make more blood and they will last longer compared to fish getting less food. This is due to the intestinal worms sucking the blood out of the fish and eventually killing the fish from low blood pressure and anemia (lack of blood).
When you feed more often, do more water changes and gravel cleaning to compensate for the extra bioload caused by the extra food.