In Marrakech you may see young Moroccan women in very western outfits with uncovered hair and riding mopeds.
You may also visit businesses such as a riad where a woman may be the main manager and interact freely with you.
You should look around to see if others are doing so or ask one of the Moroccan's accompanying you.
Try to conduct yourselves in a generally calm and reasonably quiet manner.
A lot of Moroccans, especially those who regularly deal wth tourists will simple say "hello", "Bonjour" etc based on their assessment of where they think you are from!
When meeting a female Moroccan they may offer their hand for you to shake.
However, if they do not offer their hand then a slow bowing of the head will be appropriate instead.
Moroccans who are good friends are likely to kiss each cheek and may have a more lingering handshake.
The main thing is that you behave respectfully and in a friendly way.
If at any point you are unsure of what might be expected of you, just look around at what others are doing or simply ask.
You may notice Moroccan men walking or standing holding hands, this is normal between good friends and does not indicate anything beyond platonic friendship.
Some Muslims may consider the left hand to be unclean.
You should always therefore shake hands, eat or offer and receive with the right hand.