The short answer
Not directly. Merzouga has no airport. The nearest airport is Errachidia, about two hours' drive from the dunes, and Ouarzazate further west. Both have only thin domestic schedules, mostly via Casablanca. For most travellers the road from Marrakech is quicker door to door, and the road is half the reason to go.
In more detail
Errachidia (Moulay Ali Cherif) is the closest airport to Erg Chebbi. Our destination notes put the transfer from there at about two hours. Ouarzazate is the other option, but it is about 360 km and 5 hours by road from Merzouga, so you still face a long drive.
The problem is the schedule, not the distance. Flights to both are few and often route through Casablanca rather than Marrakech, so a flight plus connections plus the transfer at the far end can take as long as driving. Some travellers use a flight to save a day on the way back, which makes more sense once you have already seen the road.
Driving gives you what a flight skips: the Tizi n'Tichka over the High Atlas, Aït Ben Haddou, the Dadès and the Todra gorge. If time is tight, fly one way and drive the other, or choose Zagora or the Agafay instead.
