Harassed? No. Hassled a bit? Maybe a little, but nothing any reasonably savvy adult can't deal with.
On my first trip to Morocco, in the 1990s, I was a solo backpacker. I was constantly hassled by "touts" - invariably young men, who seemingly had nothing better to do and who saw me as a means of gaining a few dirham (unemployment was something like 50% among young men - I sympathized, but only to a point).
"Hello, friend! You need guide?" Was constantly tossed at me as I walked by. A polite but firm NO, thanks did not stop the probing. "Friend, you need hotel?" NO, leave me alone did not either. "Friend, I just want to practice my English with you!" "OK, here's some English: Leave me alone. I told you three times. You understand?" "You racist? You don't like arabs?" You get the idea. I tried just shrugging, shaking my head, pretending I didn't understand, they cycled through a dozen languages, trying English, French, German, Dutch, Norwegian, Russian, others I could only guess at. It was pretty annoying.
Morocco had a really bad reputation for that, and I found it was for good reason.
But that was 1994. Things have gotten much, MUCH better. It seems the government figured out that tourists hated this, and were staying away. So they apparently have undercover tourist police in many places - not to catch tourists, but to catch and arrest touts who are hassling the tourists. On subsequent trips, I have seen the touts nearly disappear. There are still some young men hanging around major tourist spots, some furtively (or openly) offering to be your guide, but it seems now No Means No, and they are no longer a major hassle.
Now, you may (probably will) have to say no a few times, but in my experience, in recent years the difference is like day and night.
If there's some snake charmer doing an elaborate performance and you step up and start shooting photos, don't be surprised if they (or their co-worker) approaches you and demands a small payment. Can't help you there.
Merchants will be more than happy to have you visit their shops, check out the goods on offer, and will behave exactly like any other shop-keeper in the world. The only exception would be if you are foolish enough to contract the services of some "guide" who is really just there to steer you into his brother's carpet shop, where you will invariably be subjected to some hard selling. You always have the option of saying no thanks and just leaving, same as at home.
You do not need a guide, period. Read that again. If you can manage in Barcelona, Rome or Paris, or New York for that matter, you can get by just fine in Marrakech or Fez, using the same common sense you would use elsewhere. You. Do. Not. Need. A. Guide. Really, yes, even in the medina. Guide schmide.
Once you actually enter the Medina, any remaining touts will disappear, and you'll be left alone; all the touts hang out outside the medinas, offering guide services, because people are foolishly petrified of going inside unaccompanied, thinking that they will immediately become lost and Osama Bin Laden is going to jump out from behind a pile of sheep's skulls and get you. Once you step inside the medina, you will quickly realize that 1) yes, the streets are tiny and maze-like, but you really won't get lost, and if you do, just keep wandering, you'll eventually come back to where you entered, and 2) it's just a big, vast, very old neighborhood where people live. The people in there don't eat tourists, they're like people anywhere.
You will probably need more than 4 days if you really want to do a city or two, and the real desert.
Avoid at all costs any of the day-trip ferry port cities, do not waste your time there. Fly to Marrakech or Fes. It's dirt-cheap and easy.
Go, have fun, and forget all the silly things that uninformed people have told you to make you freak out. You'll do just fine. Really.