It would depend on the medication but it is possible that it might. For example medicine that makes you drowsy may mean that you have less energy to call on and are less focused than normal meaning the spell would be overall less effective. Similarly taking paracetamol when you have a headache could allow you to focus less on the headache and more on your intent to make it more potent.
What aspects of the medication's effect/side-effects are you worried that might affect spell work?
Depending on the medication it can sometime cause a problemm that is true. You need a clear mind to make the spell to work effectivly. This I known from my past expriences. I cast a spell went I has on medication and It came bad on me prettly badly. That was when I cast my first spell back about Five years ago. I learned by trail and error.
Only if it effects your mental state. Its the same when your sick. Its recomended not to do any spells while sick or recovering from an injury. Your soell can be effected by your bodys imbalance and your cold could wffect you spells efficiency. Also the energy you use while doing magick could make yiu heal slower.
If its just for wieght than t shouldnt be a problem.