The Barcelona forward was suspended by CONMEBOL for accusing South American football's ruling body of "corruption" after he was sent off in July's third-place play-off with Chile at the Copa America.
Messi netted the only goal of the game at the King Saud University Stadium on 13 minutes, tapping home the rebound after his penalty was saved by Brazil goalkeeper Alisson.
His effort came shortly after Manchester City striker Gabriel Jesus rolled a spot-kick wide for Brazil, who were playing without the injured Neymar.
Messi, who scored with a pair of free-kicks in his last game with Barcelona, twice threatened from set pieces in the second half before Liverpool 'keeper Alisson beat away a powerful drive from Paredes.
Rodrygo, the 18-year-old who scored a sensational Champions League hat-trick with Real Madrid this month, made his Brazil debut as he replaced Willian for the final 20 minutes.
However, Brazil were unable to find an equaliser as their winless run since capturing the Copa America title extended to five matches.
The meeting between the two South American giants was the second in Saudi Arabia in little over a year. Brazil beat Argentina 1-0 in Jeddah in October 2018.
Brazil also defeated Argentina 2-0 at home in the semi-finals of this year's Copa America, a controversial match that left Messi complaining the hosts had benefited from favouritism.
Brazil will play a friendly against South Korea in Abu Dhabi on November 19, in their final game before South American qualifying starts for the 2022 World Cup in March.