Q. If one is in the middle of reciting the Amidah, and he does not know whether or not it is Rosh Chodesh, but he thinks that it might be Rosh Chodesh, should he say yaaleh veyavo?
If it turns out that it was a regular day, is he still yotzi?
(Let’s assume that he is davening privately, or he is davening with a minyan but the chazzan already passed Retzei and the person was not paying attention to the chazzan.)
May he speak during SE to ask somebody?

A. Shulchan Aruch (O.H. 108: 12) rules that if someone said yaaleh veyavo on a day that does not require it, after the fact, he does not have to repeat the amida. However, Mishna Berura (ibid.: 38) mentions that the majority of Poskim disagree and consider it similar to talking unnecessarily in the middle of the amida and therefore a hefsek.
Horav Shlomo Miller’s Shlit”a opinion is that preferably one should just walk to the luach and check the day, while being careful not to speak and then promptly return to his place and continue the amida.
If that is not an option, he may say yaaleh veyovo, since even if it is not Rosh Chodesh he is mafsik beshogeg or he is unwittingly speaking, and after the fact, he still complies. The Rov also mentioned that he may point to yaaleh veyavo in the siddur to a friend, to signal his doubt. He should avoid asking verbally when other options are available.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a