The area around Mohammad V is very walkable. The CTM station is there as well. Petits taxis for within the city no more than 10Dh from the airport to the hotel, grands taxis for between cities no more than 150Dh to Ait Benhaddou and back...though you can probably get it lower, including to Ait Benhaddou and surrounding Kasbahs.
Don't be surprised if during a local taxi ride the driver requests you to "transfer taxis" or has "a friend to pick up on the way." When this happens, a friendly English or other language speaking person will start pitching you outings, most of them to Erg Chebbi near Merzouga or Zagora. If you are not interested, just politely tell them so, but if you are, you can negotiate a reasonable price with them.
Ouarzazate is very safe, but don't wander into weird corners at night. Crime throughout the Moroccan south is minimal, but its best not to take too many chances.