What should you do if you can't remember an ayah during prayer?
*** Whoever forgets the surah (or some part of the surah) that is after Al-Faatiha (in one's recital during prayer) there is nothing upon him, whether he is an imam or ma'mum or praying alone and whether the prayer is obligatory or voluntary. This is the most accurate position among the two positions of the scholars (regarding this point).
Fatawas of the Permanent Committee Vol.7, p:146
*** Shaikh Ibn Baaz رحمه was asked: If an imam recites a portion of the Quran during prayer but forgets part of the ayah and no one among the worshippers is able to prompt him, will he say takbeer and finish the rakaa or will he recite another surah?
He answered: He is free to choose either to say takbeer and finish the rakaa or if he chooses he may recite an ayah or (a couple of) ayat from another surah depending on what is stipulated by the Pure Sunnah in the salat where the error occurs, as long as it is not the faatiha. As for the faatiha, then it must be recited in its totality as reciting it is one of the pillars of the salat.
Ibn Baaz's Collection of Fataw vol.12, p:129
*** Shaikh Ibn Uthaymeen رحمه الله was asked:
If I were praying alone and made a mistake while reciting an ayah and could not complete it and got it mixed up with another ayah, what should I do while I am in prayer?
You may do either of these two things: You may either move on to the next ayah or make ruku', for there is much freedom concerning this point.
Ibn Uthaymeen's Fatawah 'ala-d-Darb vol.24, p:141
Translated by AbdulAli Jourari al-Maghribi