Hadith 5:46
Ibn ‘Abbas said that the Prophet had himself cupped when he was wearing the ihram and also when he was fasting. (Bukhari and Muslim.)
وَعَنِ ابْنِ عَبَّاسٍ قَالَ: إِنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ احْتَجَمَ وَهُوَ مُحْرِمٌ وَاحْتَجَمَ وَهُوَ صَائِمٌ
Original Reference: Mishkat al-Masabih 2002