I rang Royalmaroc and they sid they did not fly to Er Rachidia?
Have also looke on their website and cant get any joy.
Strange. On RAM's website Marrakech to Errachidia is an option. So I chose a couple of dates to travel - both came up negative too. I do not know why, sorry.
Royal Air Maroc usually do fly to Er Rachidia, but on selected periods, not all year round and currently no flights are available. The flight would be eg from Heathrow to Casablanca to Er Rachida or from Marrakech to Casa to Er Rachidida and Er Rachidia is a 2hr drive to Merzouga.
But you have plenty of alternatives eg independent car hire, hire of a driver, using a tour company, travel by grand taxi or bus or a combination of some of those elements and your choice is dependent upon time and budget constraints, also how long you intend to stay in Merzouga and your return route and destination.