It was narrated from Ibn ‘Abbas that the Prophet (ﷺ) was treated with cupping when he was fasting and in the state of Ihram.
Sunan Ibn Majah Book 25, Hadith 200