Sayyiduna Anas (may Allah be pleased with him) was asked about cupping (hijamah) for a person in ihram, and he said: "The Messenger of Allah (peace and blessings be upon him) had cupping done because of a pain that afflicted him (peace and blessings be upon him)."
This narration is also reported through Qatadah (may Allah have mercy on him) from Sayyiduna Anas (may Allah be pleased with him).
And it has a supporting narration (shahid) in the Sahih from the hadith of Sayyiduna Abdullah bin Buhaynah (may Allah be pleased with him).