If the fish has been successfully treated of the disease, and there has been no new symptoms, then you can return the fish to the main tank 1 week after the disease has cleared up.
------------------
On a side note, depending on which medication you used to treat the main tank, you might have killed the beneficial filter bacteria that keeps the water clean. You should monitor the ammonia and nitrite levels over the next few weeks to make sure the filter bacteria are alive and doing their job.
If you start getting an ammonia or nitrite reading, then the filters have been affected by the medication and you will need to reduce feeding for a few weeks, and do 75% water changes whenever there is an ammonia or nitrite reading.