Hi there, I will share a thought. I went though something similar when my FIL died and I was not yet divorced although my x did not dare bring the ow to the service. It was still uncomfortable as most people did not know that he had left me.
Your MIL loves you and wants you to feel that you are part of her family still. But you have to do what is right for you as well. There will be many people around your MIL I hope. If so you can go to services, perhaps offer to help at the house before the guests arrive if that is the format, and then gracefully sneak out before the stbx shows up.
If you run into them, be graceful, express condolences to the stbx, take a good look at the ow after you express your sorrow to the stbx, and either continue your duties as the daughterinlaw or get on home, whatever you choose. Good luck, you can do it. Wonder