Even in that situation, I would say no. I don't think anyone should compromise or sacrifice themselves for anyone else or anything else even for a loved one. I believe in fate. If the child was meant to survive, he'll eventually live whether he receives treatments or not. That's why even wealthy elites who have money to afford XYZ procedure and treatments are still prone to death in the end.
If people truly love you, they would rather die than to have you disrespect yourself like that just for their sake. I know, I would. What's the use of living if my loved one had to die physically or mentally inside just to save me? That wouldn't be a life to live. Being happy is seeing your loved ones happy, it goes both ways.
Plus, there are other ways. I think once you look for a shortcut or easier way out by taking off your clothes, you're more than likely to do it again if you hit rock bottom or another hardship down the road. As we all know, life ain't easy. We have obstacles and struggles every day, so don't aim too high and do your best with what you have.
We have to be righteous. It's like saying, would you kill to save your child? No. But people can argue that killing is different than selling oneself. Yeah, sort of but both are still wrong, so you can't be okay with one and throw rocks at the other. I just believe in living a righteous life. Don't steal, lie, cheat, kill, hurt anyone, and so forth just to save your own life or your loved one's. There are no justifications to do wrong. And sometimes, we have to let go and understand that there are things we can't control so let fate take care of it. The more we hold on and try to save it, we may end up not only losing that person but ourselves in the process.