OP, I am sorry for your loss 
Perhaps you might talk with your cousin. As NOK, they would have been the one talking with the doctors, and they will have given them the full information.
But it sounds as if your uncle was in poor health in addition to the ulcer, and if the doctors were saying he had a 95% chance of dying during the operation, that is just too high to risk. Far better he be given palliative care.
I lost mum last year, it's the first anniversary very soon. She had been ill for a while, so we had more warning than you. But it still hurt to agree with the doctors that she be labelled as DNR. Mum was too frail for any CPR, it would have killed her, and we didn't want her final moments to be full of pain and without us by her side.
Yes, there were other things that could have been done, your instinct is to keep trying. But looking back and being absolutely honest with myself, that instinct to keep trying can sometimes come from a place of selfishness. A part of me wanted the doctors to keep trying because I didn't want to lose mum, I was thinking about me, and not what was best for her. I had to give myself a shake and let mum go. That was best for her, she died peacefully. She was in her 70s too.
I think in time you will be able to see this more clearly, that sometimes the best thing to do is to let them go.