Gonna be tough. My first instinct would be DUST DEVIL (92).Here's a trailer, much of the film happens in the Nambian desert. Check out the final seconds of this trailer for some of the dunes and the "protagonist":

We're getting closer! I can add that I saw the film ca. 1987/1988, so your first suggestion wouldn't work. "Circle Of Iron" is very close to the cinematography and atmosphere I remember, but it's not it. Same for "El Topo", but to a lesser extent, even though the surreal quality resembles the concluding scene of the lunatics among the ruins (trailers to both films can be found on Youtube).

My film was most definitely set in some kind of Arab world, if not necessarily a historically convincing one. I remember sophisticated courts in luxurious palaces.

I saw it in France, so this might be a French or European film.

How did you find the three films you suggested? Did you know them beforehand or did you come across them through some research?

Yes, it should be one of those French/Italian/Spanish productions from the 70s/80s. Now that I got myself thinking, it was probably a historical movie, though perhaps not a very accurate one. Or a somewhat fantasy-like one.