Often, yes.

TMS may be used along with medication and psychotherapy. However, your clinician should review all medications before treatment because some medicines can affect TMS safety or seizure risk. (nimh.nih.gov)

Do not stop or change your medication unless your healthcare provider recommends it.