I work in Dubai in quite a formal office and our dress code is nothing above the knee and nothing sleeveless eg I would wear a pencil skirt as long as it fell just below my knee and a short sleeved blouse as long as it wasn't too low cut/sheer.
I live on the beach in area where there is a very high (western) expat population so would happily wear a bikini on the beach, shorts and a tshirt if I was popping to the convenience store next to my apartment etc. If I was going somewhere more 'public' eg the mall, I would be more likely to wear something like a maxi dress with a cardigan or a pashmina over my top half.
As several other people have said, the AC is freezing everywhere so take plenty of light layers. It is obviously very, very hot here at the moment but to be honest, you really won't be outside much at all so lots of palazzo trousers, maxi skirts etc are fine.
As someone else also said upthread, shopping in Dubai is good so if you are coming here first, maybe don't pack too much and buy loads here once you have a better understanding of what you will feel comfortable wearing.
I can only speak for Dubai but it's definitely best to err on the side of caution. Please don't be one of the westerners who walks around with too much flesh on show. Chances are no one will actually say anything to you about it, but you will feel really uncomfortable and are likely to get lots of looks.
Final advice and what we get told at work: If you have to question whether something is inappropriate, it probably is.