If doc is aware that you are breastfeeding, they usually will prescribe breastfeeding safe meds and you’ll be able to still continue breastfeeding after taking the meds. I use this website https://www.e-lactancia.org for reference too.
As long as medication is safe. Upon prescription, you have to inform the doctor you are breastfeeding.
Usually advice to pump and throw for a day at least
depends on medication so best to consult doctor