Orach Chaim 422:1 mentions that one who forgets Yaale V'Yavo at Maariv does not have to Daven again since we do not do Kiddush HaChodesh at night. However if one forgot at Shacharis or Mincha he does have to Daven again. This coming month Sivan 5773 the Molad is at 7:49 AM and 16 Chalakim on the actual day of Rosh Chodesh. If one Davens Shacharis at 6 AM prior to the Molad and forgot Yaale V'Yavo would they be required to Daven again since it is during the day or perhaps not since it would not have been Rosh Chodesh yet since it is prior to the Molad?
It doesn't seem that there is a connection between the Molad and the sanctification of the month during the day.
The Talmud in Sanhedrin (11b) relates the following:
Based on this, it would seem that the need to sanctify the month during the day is unrelated to the appearance of the molad and therefore according to the reasoning of the Shulchan Aruch that you quoted one would be required to repeat shmoneh esrai if one forgot to insert ya'aleh ve'yavoh even if one originally said it prior to the appearance of the molad.