If a family member like your sister would need an organ she'd need to survive with could you give her yours?

If you like really have the same blood type and everything but you'd be dead if you'd give idk a very important organ to her? Would doctors be allowed to "kill" you because you wanted that so they can save your sibling?
Just curious.