Only a licensed veterinarian should try to do that type of surgery (or someone trained specifically for it). Stomach surgery especially is very risky. If there is the slightest hole or tear, it will be leaking digestive fluid and food into the body cavity, which could VERY rapidly lead to death.
It's a possible remedy, but not something to be done unless the situation is dire, or you have it done by a professional.