i went to marrakesh and wore mainly cropped trs and loose fitting t shirts and still got stared at, so anything revealing would be frowned upon in marrakesh, i think agadir wouldnt be so bad as its a beach resort although i havent visited it myself
I think to err on the side of caution (certainly outside of the hotel complex) is advisable. For the blokes, shorts are frowned upon as is being without a top on. 3/4's are fine.
For the ladies, as long as nothings too revealing ie: shorts/short skirts/anything that reveals too much cleaveage (you get the drift) is fine.