Hazrat Urwah bin Zubair used to have cupping done while fasting, and then he would not break his fast. Hisham said: I have never seen Hazrat Urwah having cupping done except that he was fasting.
Imam Malik, may Allah have mercy on him, said: Cupping is not disliked for the fasting person except out of fear that he may become weak, and if there is no fear of weakness, then it is not disliked. So if a person has cupping done in Ramadan, and then manages to avoid breaking his fast, then nothing is required of him, nor is he obliged to make up that day, because cupping is disliked only when there is fear of breaking the fast. So if he has cupping done and avoids breaking his fast until evening comes, then nothing is required of him, nor is he obliged to make up that day.
Hadith Referenceموطا امام مالك رواية يحييٰ / كتاب الصيام / 610