Thanks for posting your query.
There are many medications which are secreted into breast milk.
So there are many restrictions in usage of medications during breastfeeding
Consult your gynecologist and take her opinion since it goes with which medicine is prescribed and its dosage.
Hope I have answered your query.
Wishing you good health.