1 Rav Shlomo Kluger, Chochmat Shlomo on Shulchan Arukh, Choshen Mishpat 426:1
נראה לפענ"ד לכאורה דין חדש דהיינו דוקא אם אינו דרך בזיון להמציל אז מחיוב להצילו בגופו אבל אם הוי הצלה דרך בזיון להמציל אם א"י לשכור לאחרים להצילו אז אינו מחיוב להצילו בגופו אם הוי לו בזיון או טרחא יתרה דהוא זקן או כדומה והטעם כיון דילפינן הצלת גופו מוהשבותו לו וכו' כמ"ש בש"ס ובסמ"ע ג"כ א"כ כיון דמטעם השבת אבדה הוא כמו באבדה קיי"ל והתעלמת פעמים שאתה מתעלם כמו שדרשו חז"ל כגון זקן ואינו לפ"כ א"כ ה"נ מהשבת גופו פטור כה"ג
It seems to me, apparently, a new ruling: only if rescuing is not done in a degrading way is one obligated to save him with his own body. But if the rescue would be done in a degrading way, and one cannot hire others to save him, then one is not obligated to save him with his own body if it would be degrading to him, or an excessive burden — for example, if he is elderly, or the like. The reason: since we derive saving a person's body from 'you shall return it to him,' and since the source is hashavat aveidah — just as for a lost object we hold 'you shall hide yourself,' that sometimes you may hide yourself, as Chazal expounded, e.g. an elderly person for whom it is not in keeping with his dignity — so too for returning a person's body, one is exempt in such a case.
Rav Shlomo Kluger (1785-1869), Chochmat Shlomo on Shulchan Arukh, Choshen Mishpat 426:1, on the case of one who sees his fellow drowning in the sea (the Shulchan Arukh's own case, under 'lo ta'amod al dam re'echa'). Kluger derives the duty to save a life from hashavat aveidah (Sanhedrin 73a), and therefore imports the aveidah exemption for a zaken ve'eino lefi kvodo — an elder for whom it is not in keeping with his dignity (Bava Metzia 30a) — into pikuach nefesh itself: if the rescue would be degrading and he cannot hire someone else, he is exempt. The classic illustration given for the ruling: a sage who would have to undress and jump in naked before many onlookers. Kluger himself immediately raises a difficulty (tzarich iyun) from Rashi on Bava Kama and from Bava Metzia 30a, which imply even burial — let alone saving a life — applies even when it is not lefi kvodo. The ruling is sharply contested: Klei Chemdah (Ki Teitzei, os 6) challenges it, and the Har Etzion shiur on the obligation to save calls Kluger's words very difficult and declines to accept them. Text: https://ashoova.co.il/ask/%d7%a9%d7%95%d7%9c%d7%97%d7%9f-%d7%a2%d7%a8%d7%95%d7%9a-%d7%97%d7%95%d7%a9%d7%9f-%d7%9e%d7%a9%d7%a4%d7%98-%d7%aa%d7%9b%d7%b4%d7%95-%d7%97%d7%99%d7%99%d7%91-%d7%90%d7%93%d7%9d-%d7%9c%d7%94%d7%a6/amp/