I rescued a faction ally from a mechanoid fight who had their leg blown off. There was no option to install a pegleg and he would have stayed in my medical bed forever. (I had to arrest him and make enemies of his faction in order to force a pegleg operation so he could be released.)
His faction would of carried him away during their next visit (And I believe a reward would of been given?)
But ofcourse that's not really explained in the game anywhere so ;D
Game doesn't allow operating on allies b/c people would abuse the hell out of it and organ harvest to their hearts content