In the Name of Allah, the Most Gracious, the Most Merciful.
As-Salāmu ‘Alaykum Wa-Rahmatullāhi Wa-Barakātuh.
In principle, if ghusl becomes obligatory while water is available, then performing ghusl is necessary.
In most cases, hospitals do provide some form of washing or bathing facility, even if it is not a shower. Therefore, you should try to explore all available options by asking the nursing staff or those in charge if there is a more suitable place where you may perform ghusl with ease and privacy. If such facilities are not available, the matter may be raised with the hospital administration.[1]
With regard to being connected to an IV drip, ghusl is still possible. The IV line may be temporarily disconnected. If it is harmful for water to reach the cannula, then it is sufficient to simply pass a wet hand over the cannula (Masah).
You should consult the attending nurse before taking any step involving the IV line to ensure there is no medical risk.[2]
And Allah Ta’ala Knows Best.
Abdour-Rahmaan Lim Voon Heek
Student Darul Iftaa
Port-louis, Mauritius
Checked and Approved by,
Mufti Muhammad Zakariyya Desai.