From: Rabbi Moshe Sofer
To: Rabbi Menachem Beck
A woman with a uterine prolapse had a ring-shaped pessary inserted by physicians in a position where removal caused dangerous pain. The Chasam Sofer rules leniently, permitting immersion with the ring in place, on multiple converging grounds: the ring occupies a makom balu'a exempt from chatzitzah entirely, any chatzitzah in beis hastarim is at most rabbinic, and since removal is dangerous the ring qualifies as mi'ut she'eino makpid, resolving a safek d'rabbanan in favor of leniency.
Source: Shu"t Chasam Sofer YD §193