Having had medication in a QT is no risk to your reef that is the whole purpose of a QT so you can medicate outside of the reef. This is for two reasons some medication like copper can leach into the rock and substrate which would require more medicine then in a controlled environment and may be harmful to corals and inverts.