Dress conservatively
Because Islam is widely practiced in Morocco, where over 99 percent of the population is Muslim, typical scenes will feature modestly dressed ladies (and men). Women commonly wear a full burqa or a hijab (scarf) on their heads from head to toe. Although you are not required to dress like the locals do, they are aware that many visitors are not Muslim, so I wouldn't rush to pack your short dresses and cleavage-baring tops.
If you don't want a lot of unwanted attention, marriage proposals, groping, and male harassment, don't do it. Anyone interested? No? That's OK. Wear long dresses, jumpsuits, trousers, and blouses to keep your arms and legs covered. Also, don't forget your secret weapon: a pashmina! This is a great piece to wear to hide your shoulders.