Suppose one's minhag is to daven Nussach A; but, one finds oneself in a synagogue, which only has siddurim of Nussach B, and one has not committed all of Nussach A to memory. He could daven Nussach A and look in the Siddur as well for help when he forgets but it adds confusion to the davening.
Does Halakhhah permit one to daven Nussach B in such a situation?