I'm sorry for your loss. I would suggest you attend the funeral (if that's ok with the family) but you should skip the visitation. That's an awfully intimate, close-quarters event, and I can't imagine how your presence would not cause tension. Sure, you have a right to be there, but even more important is that you do the right thing. Why cause your ex and his parents/siblings to grieve any more than necessary by being there? In this particular case, what they need trumps what you need.
I don't know if funeral homes do this or not, but if it's ok with the family, and you personally NEED to see her one last, maybe you could arrange with the director to arrive 15 minutes prior to the visitation so you could say your goodbyes without upsetting anyone else in the process.
My mother attended the funeral of my dad's father and he had someone ask her to leave! He is not the kind of person to do something like that, and he has regretted doing that ever since and apologized soon after. But, grief causes your emotions to be all out of whack. So, just remember, they probably aren't thinking very logically right now, but you still should respect their wishes. (By the way, my father made sure my mother knew she was welcome at his step-mother's funeral years later.)