Duchess Margaret (1928-2017) had 2 twin sons in 1962 with Robin Grinnell-Milne before she married the viconte de Chevigny in 1970
The two youngest children of Queen Marie of Romania were often said to be the offspring of her lover, Prince Barbu Stirbey, especially the youngest, Mircea. However both were officially recognised as his own by Marie's husband, King Ferdinand.
But regardless of whether they were officially recognized by her husband, the fact remains that both were born within lawful wedlock, so those examples don't really count. My focus was mainly on royal women who gave birth before or after marriage -- meaning that they were either spinsters or widows. Of course, this could not but extend discussion to queens and princesses who committed adultery ...
As for the two youngest children born to Marie: the case for Mircea having been biologically fathered by a lover is a fairly strong one, since according to his mother's testimony he had brown eyes. All the other children had blue eyes -- just like Ferdinand and herself.
I'm not saying this is foolproof evidence that the biological father was Prince Barbo Stirbey, since there is a FAINT chance of two blue-eyed parents producing a brown-eyed child. But regardless who the man was, it is highly unlikely to have been the king.
With Ileana, however, matters are different: as pointed above, she had blue eyes. So even though this is not evidence that Ferdinand was the biological father, you cannot automatically rule him out or point to a near uncertainty. Rumors aside, I don't see an especially good case for Barbo being the father, than for the older children. Indeed, his conduct toward her was of avuncular affection -- as with her older siblings.