It is narrated from Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) had cupping done while in the state of ihram and while fasting.
Hadith Referenceمسند الإمام الشافعي / كتاب الصيام / 655
Hadith Takhrijصحيح من غير هذا الطريق ، اخرجه البخاري، الصوم، باب الحجامة والقئ للصائم (1938) ، (1939)۔