The 1917 canon law contained an exception to the canonical form of marriage requirement for those baptized Catholics in the situation described in the OP. This exception was removed starting in 1949. Canon Law Digest III (pp. 463-464) explains:
**
Exemption of “ab Acatholicis Nati” Abrogated** (Pius XII, Motu proprio, 1 Aug., 1948) AAS 40-305.
This Motu proprio, entitled “Abrogatur Alterum Comma Paragraphi Secundae Canonis 1099,” is as follows:
The Decree, Ne temere, issued by order of Our Predecessor of happy memory, Pius X, had provided (art. XI) that all persons baptized in the Catholic Church, even if they had afterward fallen away from it, were bound to observe the form of marriage prescribed in the Council of Trent.
However, as regards persons born of non-Catholics and baptized in the Catholic Church, who from infancy had grown up in heresy or schism or infidelity or without any religion, lest their marriages should be null, it was provided in the Code of Canon Law that baptized persons of this class are not bound to observe the canonical form of marriage.
But the experience of thirty years has sufficiently shown that the exemption from observing the canonical form of marriage, which was given to this class of persons baptized in the Catholic Church, has not conduced to the good of souls, and has moreover very frequently multiplied difficulties in the solution of cases; wherefore We have deemed it expedient that this exemption be revoked.
Accordingly, after hearing from the Eminent Fathers of the Supreme Sacred Congregation of the Holy Office, We of Our own motion and out of the fullness of Apostolic power, decree and provide that all persons baptized in the Catholic Church are bound to observe the canonical form of marriage; and We therefore abrogate the second clause of paragraph 2 of canon 1099, and order that the words, “item ab acatholicis nati, etsi in Ecclesia catholica baptizati, qui ab infantili aetate in haeresi vel schismate aut infidelitate aut sine ulla religione adoleverunt, quoties cum parte acatholica contraxerint,” be expunged from canon 1099.
And We take this occasion to admonish missionaries and priests to observe most carefully the provisions of canons 750-751.
We therefore order that this Apostolic Letter given of Our own motion be reported in the Acta Apostolicae Sedis, and We decree that its provisions shall go into effect from the first day of January, 1949.
All things to the contrary, even such as are worthy of special mention, notwithstanding.
Given from Castel Gandolfo near Rome, the first day of August, Feast of Saint Peter in Chains, in the year nineteen hundred and forty-eight, the tenth of Our Pontificate.
AAS 40-305; Pius XII, Motu proprio, 1 Aug., 1948. Periodica, 37-334 (Creusen) .