I dont think it is wise for Iraq to buy Rafale. Iraq should rather focus on economic, governance, and other more productive matters. Iraq currently doesnt have external military thread and have become Iran best buddies. Better Iraq focus on the economy and learn industrialization and manufacturing from Iran.
Learn to be patience. Develop the economy first, Iraq has too much reliance on oil industry which is not good if we see what will be the trend in the future with the adoption of electric vehicle and solar panel. The technology are likely to be progressing much and possibly in the future every house hold can generate enough electricity from their house rooftop with relativey affordable cost.
There is still window of opportunity currently for oil producing countries and it should be used to develop industry and infrastructure (many of infrastructure are also destroyed during US lead invasion).
Military spending should be made below 1 percent of GDP. Iraq current military spending which is at 3.7 percent of GDP is ridiculous. Iraq should maintain balance between US and Iran, it will save Iraq future and avoid possible US sanction like what happen with Iran allies like Bashar regime in Suriah, Houti in Yaman, and Hisbullah in Lebanon.