It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Noble Prophet (peace and blessings be upon him) had cupping done while in the state of Ihram and also had cupping done while fasting.