The posted question actually asks four questions:
Are both "He is dating John's ex-wife" and "He is dating an ex-wife of John's" acceptable ways of describing a situation, given that John has more than one ex-wife?
Are both "She is dating the ex-president of Xland" and "She is dating an ex-president of Xland" acceptable ways of describing a situation, given that Xland has more than one ex-president?
Are both "She is dating the former president of Xland" and "She is dating a former president of Xland" acceptable ways of describing a situation, given that Xland has more than one ex-president?
Do any of the statements in questions 2 and 3 imply that the ex-president who is being dated is the immediate predecessor of the current president of Xland?
At a strictly logical level, it seems clear that "the NOUN X" works best in situations where "NOUN X" is either unique or previously identified, and that "a NOUN X" works best in situations where multiple NOUN Xs exist and the speaker is referring to one of them. But in practice people are not entirely rigorous in their use of "the NOUN X" and "a NOUN X."
So, with regard to question 1 above, a speaker might may use either formulation, despite being aware that John has multiple ex-wives and despite the greater logical precision of using "an ex-wife of John's" in such a situation.
Question 2 is functionally identical to question 1 above—though it replaces "He" with "She" and "ex-wife" with "ex-president"—and yields the same answer.
Question 3 replaces "ex-president" with "former president" but otherwise repeats question 2 and again yields the same answer.
Question 4 asks whether calling someone "the ex-president," "the former president," "an ex-president," or "a former president" is equivalent to calling that person "the current president's immediate predecessor." I think we can safely say that it does not. A person who is currently dating Jimmy Carter could be said to be "dating the former president/dating a former president/dating the ex-president/dating an ex-president" without any implication that Carter was the immediate predecessor of the current occupant of the White House—and the same goes for someone dating a previous president of Xland.