It is permissible for a woman to take medication to bring forward the time of her period, if the intention behind that is not to use a trick in order to avoid fasting in Ramadan, and so long as that will not result in any harm for her.
I put this question to our shaykh, ‘Abd ar-Rahmaan al-Barraak (may Allah preserve him) and he said:
It is better to leave things as they are, and to inform the husband of that, and he may enjoy intimacy with her in the ways that Allah has permitted, without having intercourse.
But if you must do that, then it is permissible for her to take medication that will change the menstrual cycle, even if it is brought forward to the month of Ramadan, then she may break the fast but must make up those days. End quote.
And Allah knows best.