I thought I would share an experience that I had when I was there last year.
I was traveling with another female friend (we're in our mid 30s.) On our last night in Marrakech, we decided to have dinner at one of the stalls in Djemna el Fna before celebrating the fun week with cocktails at one of the plush hotels outside of the medina. It was February, and I wore a a shorter dress that I paired with heavy opaque tights and flats. Since it was chilly at night, I wore my long overcoat. The dress wasn't really low-cut or revealing so I felt comfortable wearing the jacket unbuttoned. I was more or less covered from head to toe in some kind of fabric.
We settled on a food stall where the guys running it were particularly flirty. The one chap offered me 2,000 camels for my striking green eyes. ;-) So while the men were flirty and very attentive to us, we never felt threatened and we shared a great meal.
When we finished with dinner, we stood up to leave and they asked where we were going. We were super vague with the details but thanked them for the meal. One of the men stepped forward towards me and proceeded to button up my jacket. I was a bit surprised by the gesture, but he wasn't trying to cop a feel or anything and it felt like he was just trying to ensure that we didn't have any trouble after we went on our way.
When I have shared the experience with different ones, some of my female friends were troubled by his gesture. It definitely wasn't his place, but it was a gentle gesture and I never felt threatened. And I'm returning to Marrakech and Morocco in April.
Moral of the story is that a single woman or a pack of women can never really be too modest and it's important to be modest while out and about especially when the sun goes down.