Istikhaarah means asking Allaah to help you choose the better of two things and to divert the worse of them. Praying two rak’ahs beforehand is only prescribed before the du’aa’ to make it more likely to receive a response, and to help bring about proper presence of mind and make the du’aa’ more likely to be accepted.
Ibn Abi Jamrah said, as narrated in Fath al-Baari (11/186):
The wisdom behind putting the prayer before the du’aa’ is that the aim of istikhaarah is combine the best of this world and the Hereafter. So he needs an introduction before presenting his case before Allaah, as it were. And there is nothing better for that than prayer, because it involves venerating Allaah, praising Him and expressing one’s need for Him now and always. End quote.
The istikhaarah that the Prophet (peace and blessings of Allaah be upon him) taught us includes praying two rak’ahs then reciting the du’aa’ after that.
If a Muslim cannot offer the prayer (two rak’ahs) for some reason, there is nothing wrong with calling upon Allaah and asking Him to make easy for him the better of the two options, without offering the prayer.
Al-Nawawi (may Allaah have mercy on him) said in al-Adhkaar (p. 120):
If he cannot offer the prayer then he may recite the du’aa’ of istikhaarah. End quote.
These words of al-Nawawi were quoted by a number of scholars from different madhhabs, who quoted them as evidence.
See: Haashiyat Radd al-Muhtaar (2/27); al-Fawaakih al-Dawaani (1/35); Sharh Mukhtasar Khaleel by al-Kharashi (1/37); Asna’l-Mataalib (1/205).
And Allaah knows best.