It is permissible for the Muhrim to stipulate a condition for exiting Ihram because of sickness and the like Sahih Muslim 1207 b
Arabic hadith text
وَحَدَّثَنَا عَبْدُ بْنُ حُمَيْدٍ، أَخْبَرَنَا عَبْدُ الرَّزَّاقِ، أَخْبَرَنَا مَعْمَرٌ، عَنِ الزُّهْرِيِّ، عَنْ عُرْوَةَ، عَنْ عَائِشَةَ، - رضى الله عنها - قَالَتْ دَخَلَ النَّبِيُّ صلى الله عليه وسلم عَلَى ضُبَاعَةَ بِنْتِ الزُّبَيْرِ بْنِ عَبْدِ الْمُطَّلِبِ فَقَالَتْ يَا رَسُولَ اللَّهِ إِنِّي أُرِيدُ الْحَجَّ وَأَنَا شَاكِيَةٌ . فَقَالَ النَّبِيُّ صلى الله عليه وسلم "حُجِّي وَاشْتَرِطِي أَنَّ مَحِلِّي حَيْثُ حَبَسْتَنِي " .
Translation
A'isha (Allah be pleased with her) reported that Allah's Apostle (ﷺ) went (to the house of) Duba'a bint al-Zubair b. Abd al-Muttalib. She said
Messenger of Allah, I intend to perform Hajj, but I am ill. Thereupon Allah's Apostle (ﷺ) said: Enter Into the state of Ihram on condition that you would abandon it when Allah would detain you.