The striker struck on nine minutes in south-western city Agadir, holding off a pack of defenders to fire past goalkeeper Mohamed Amsif.
Spain-based defender Issam El Adoua levelled on 50 minutes with an unstoppable close-range header off a Younes Belhanda free-kick.
The second half was less lively than the first in a match marking the opening of the 45 000-seat Grand Stade Agadir in the Atlantic city.
Several FIFA Club World Cup fixtures will be staged this December at the ground, one of four venues for the 2015 Africa Cup of Nations.
A vibrant sell-out crowd saw Morocco dominate first-half possession, but Bafana threatened to increase the lead several times with swift counter-attacks.
The impressive play of the visitors earned applause from the crowd on the half hour as the home team struggled to create chances.
And when they did, Bafana goalkeeper Itumeleng Khune impressed with acrobatic saves from a header and a shot by captain Mehdi Benatia.
Substitute Abdelhamid El Kaoutari had a late chance to win the game when unmarked inside the box, but fired hopelessly wide.
Morocco and Bafana are among former World Cup qualifiers who failed to make the Africa zone play-offs for the 2014 tournament in Brazil.
Morocco (0) 1 (El Adoua 50’)South Africa (1) 1 (Rantie 9’)
Morocco: Amsif, Benatia (Oulhaj 80’), El Adoua, Feddal, Noussir (El Kaoutari. 46’), Bergdich, Obbadi (Taarabt 46’), Belhanda (Bemaamar 75’), Barrada, El Kaddouri O. (Saidi 46’), El Arabi
South Africa: Khune, Ngcongca, Khumalo, Xulu, Masilela (Ntlhe 67’), Claasen, Furman, Vilakazi (Zungu 46’), Chabangu (Patosi 59’), Parker (Letsholonyane 83’), Rantie (Erasmus 70’)