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

Sahih al-Bukhari Book 76 Hadith 16

Sahih al-Bukhari #5694

Medicine 76:16

Narrated Ibn `Abbas:

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

Chapter: What time one should be cupped

Grade: Sahih