It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that he was asked about a fasting person having himself cupped (hijamah), and he said: "We did not regard this act as disliked (for a fasting person), unless it exhausts him or weakens him excessively." The narrator did not attribute this statement to the Messenger of Allah (peace and blessings be upon him) as a marfu' report. He also said: "The Messenger of Allah (peace and blessings be upon him) had himself cupped while in the state of ihram because of a pain in his head." All the narrators of the chain of this narration are thiqat (trustworthy) and reliable.
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب الطب / 3899