I'm sure your friend is feeling very helpless and sad.
There is always this possibility during any surgery. I usually offer to have a spay/neuter done before leaving here because I really don't want anyone buying a dog from me to feel this heartache. I've never had one die but know of this possibility with my medical backround.
Sending prayers for your friend. RIP