There is no Islamic ruling that forbids contact between an ex husband and wife. Yes, they become non-mahram to each other, but their parent-in-laws do stay mahram to them. This means that although he is divorced, his mother-in-law still stays mahram. And the same for the ex-wife as well.
It would be the best thing for ex-partners to stay civil and have good conduct towards each other. It does not need to be hostile and a battle. The ex might be uncomfortable in the presence of their ex, that is understandable, but it is not forbidden or haram to have common interaction, like between any other non-mahram, along with observing the correct shar'i boundaries as well.
However, if there are children from that relationship, it would be necessary to have a positive and healthy relationship, or at least neutral and not hostile in any way. If there is a certain event that would bring both together, or a family gathering, or something of that kind, then it is absolutely fine to be there. You have a choice of attending, or excusing yourself. Whether you wish to interact or not, that is completely up to you.
It could be the case that there was violence in the relationship, for example, and therefore the ex-wife would not be comfortable at all in being in the same place as the ex-husband.
In any case, to answer your specific question, yes, it is allowed for her to accept the invitation, bearing in mind everything else I have mentioned.
And Allah knows best.