Question: I was davening without my Siddur and realised that I may have said mashiv haruach accidentally. Was I allowed to walk to get a siddur to look up the halacha in the middle of my amida?
Answer: The Mishna (Berachos 20b) teaches how one must conduct oneself when davening the amida, not even interrupting to respond to a (Jewish) king’s greeting (See Shulchan Aruch OC 104:1).
Nonetheless, the Mishna Berura (104:1) writes that if one is distracted by a child who is crying and one cannot motion to them to quieten them, one may move away to complete their amida. Likewise, he writes (96:7; 104:2) that if one gets confused while davening they may walk to get a siddur. The Chayei Adam (25:9) writes that it is even permissible to ask somebody the appropriate halacha if necessary.
R’ Chaim Kanievsky (quoted in Dirshu Mishna Beura 104:n8; Ishei Yisrael Teshuva 115) adds that once one has found the siddur or appropriate sefer, they should continue davening immediately, rather than walk back to their original place.
In conclusion, one who cannot continue davening their amida due to not knowing the appropriate halacha or text may walk over to find a siddur or sefer in order to continue. If necessary, they may even ask someone. Afterwards, they should immediately continue where they left off.