Fiqh-us-Sunnah Volume 5, Hajj and ‘Umrah, Fiqh 5.131.

Section : A Muhrim Terminating Ihram Because of Illness or Some Other Reason.

Many scholars hold it to be permissible for one to set a condition when entering the state of ihram that one will be relieved of it if one fell ill. Muslim has reported from Ibn ‘Abbas that the Prophet (peace be upon him) told Daba’ah, “Perform Hajj but set a condition that you shall be relieved of the ihram whenever you are prevented (due to illness, etc.).”

ln such a case if a pilgrim is prevented from performing Hajj or ‘Umrah for any reason, illness or something else, he may terminate his state of ihram and not be required to slaughter any animal, or fast in atonement.