In general, you can wear what makes you comfortable in Morocco. Locals are accustomed to tourists. However, in certain parts of the city, particularly the Medina, dressing modestly is appreciated as the area is more traditional.