The Prophet (ﷺ) was cupped while he was fasting.

Sahih al-Bukhari Book 30 Hadith 46

Sahih al-Bukhari #1939

Fasting 30:46

Narrated Ibn `Abbas:

The Prophet (ﷺ) was cupped while he was fasting.

Chapter: Cupping and vomiting in Saum (fast)

Grade: Sahih