EDIT: While I was busy looking this up in my old catechism apparently you found it too.

Anyway, didn't see your post before posting mine.
I don't mind off-topicness, perhaps the OP won't mind either.
As I said, I have an
old catechism that forbids this. The new catechism is not specific enough to mention this. I'll look it up for you.
My source is
Mgr. P. Potters Verklaring van den katechismus der Nederlandsche bisdommen, zevende deel, derde herziene en bijgewerkte druk, 's-Hertogenbosch 1931, p.105
On the impediments of marriage it states:
"Het beletsel van de misdaad. Hieronder verstaat men:
a. echtbreuk met wederzijdsche belofte van elkander te huwen na den dood der wederhelft; alsmede echtbreuk met poging tot een huwelijk (b.v. het burgerlijk huwelijk).
b. echtbreuk met moord op de wederhelft door een der medeplichtigen gepleegd.
c. moord ook zonder echtbreuk met gemeenschappelijk overleg op de wederhelft gepleegd.
De Kerk heeft dit beletsel ingevoerd om de huwelijkstrouw te beschermen en het leven van onschuldige echtgenooten te beveiligen."
Footnote: "Ons B.W. [burgerlijk wetboek] art. 89 bepaalt, dat personen, wier overspel bij rechterlijk vonnis is bewezen, nimmer met hun medeplichtige in het huwelijk mogen treden."
Translation:
"Impediment of crime. This means:
a. adultery with mutual promise to marry each other after the death of the spouse; also adultery with attempt to marriage (e.g. civil marriage).
b. adultery with murder of the spouse by either accomplice.
c. murder without adultery, committed in mutual agreement.
The Church has put this impediment in to protect marital fidelity and to protect the life of innocent spouses."
Translation of the footnote: "Our [= Dutch] book of civil law, article 89 states that persons whose adultery is proven in a court of law can never marry their accomplice."
So even (at least in the 1930's) civil marriage was not possible for people who broke up another marriage, the likes of David and Bathsheba, or Charles and Camilla.
I looked it up in the current canon law (of 1983) at the Vatican website and the impediment of crime (Can. 1090) now only mentions murder as an impediment, whereas my catechism clearly also states that adultery is also an impediment to marry your accomplice.
"Can. 1090 §1. Anyone who with a view to entering marriage with a certain person has brought about the death of that persons spouse or of ones own spouse invalidly attempts this marriage.
§2. Those who have brought about the death of a spouse by mutual physical or moral cooperation also invalidly attempt a marriage together."
Code of Canon Law - IntraText
Apparently adultery was in the past an impediment to marriage, as can be found here:
"An Impediment of Crime nullifies marriage according to ecclesiastical law, and arises from adultery and homicide separately or together."
"According to the actual law (Decretal. Greg. IX, Lib. 4 X tit. 7: De eo qui duxit. Cap. i, Propositum Cap. vi, Significasti) there are two cases in which an adulterer may not marry one with whom the crime was committed:
- (1) When the adulterer promises to the partner in guilt marriage after the death of the other's legitimate spouse;
- (2) When the two attempted marriage and this was consummated during the lifetime of a legitimate spouse."
CATHOLIC ENCYCLOPEDIA: Impediment of Crime