My friend and I are in the middle of davening Shmoneh Esreh. Rather than talk, I text him, "I don't remember if today is Rosh Hodesh. Do we say 'Ya'aleh V'yavo?'" Can I interrupt my friend for this purpose so I know what to do, and can he text me the response (interrupt his own davening)?
It seems that you are assuming that he is using his phone to daven with for the text of the shmoneh esrai. Otherwise, it will be turned off and he would never get the message. Those apps (that put the sidur on the screen) will not allow a text message to come through and interrupt. Nowadays many phones have apps that show the Hebrew date. If you have the phone, then check the date yourself. That would tell you without having to interrupt your friend.
If you have a phone with the siddur app, it would automatically show you Ya'ale Veyavo as well.
In any other circumstance, everyone in shul would have his phone turned off.