It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) had cupping done on his head while in the state of ihram. The narrator says that this was due to some ailment.