Yes, I think there is a confusion between marriages that can be annulled at law, as in the examples I gave, and marriages that are lawful but have resulted in divorce.
Where divorce is considered 'shameful' to that person's religious beliefs, they can petition their faith leaders to declare the marriage null and void in the eyes of their church, meaning they can marry again in that church (or mosque, synagogue, temple, whatever religion it may be).
In that instance the first marriage still must legally ended in divorce before the second marriage can take place.