It depends what the medication is, and the level. Antibiotics will kill many types of bacteria [that is what they are intended for]. Copper-based treatments can kill bacteria. The extent to which this occurs will depend upon the tank's biology and the level of antibiotic/medication used.
But remembering that these bacteria will colonize if their "food" is available, most probably reform before you notice it. Having live plants will also help, as they grab the ammonia faster anyway.
The nitrifiers in an established tank will likely not be bacteria but archaea, a different form of life. I've not yet come across definitive data on various aspects of these, comparable to how bacteria respond, as this discovery is still fairly recent. I would suspect it is similar.