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

Sahih al-Bukhari Book 30, Hadith 46