It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) had cupping done while in the state of ihram due to a sprain in his leg bone or back.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 14857
Hadith Gradingحکم دارالسلام:صحيح لغيره، أبو الزبير لم يصرح بسماعه من جابر، وانظر: 14280