The Prophet ﷺ was cupped while in a state of ihram.
أخبرنا قتيبة قال حدثنا سفيان عن عمرو عن طاوس وعطاء
أن النبي ﷺ احتجم وهو محرم
No references are available.
[Sahih] See the previous hadith. It is in Al-Kubra, hadith no. 3829.