It has been a tumultuous summer for Messi and Barca, with the club captain requesting the termination of his contract a few weeks ago, enabling him to speak to other teams about a transfer.
Barcelona refused, and insisted his release clause would have to be paid.
Eventually, Messi made the decision to stay, as Barca fans let out a collective sigh of relief.
One of the main reasons for his initial request to leave was his non-belief in the performance of club president Josep Maria Bartomeu.
Rivaldo believes that, under a new president, Messi could ultimately sign a new contract to take him beyond the summer of 2021.
"Lionel Messi said he would stay at Barcelona until his contract expires at the end of this season. But I wouldn't be surprised if he stayed at the club beyond his current deal," the Brazilian told Betfair.
“A lot could happen this season, as Barcelona begin life under new manager Ronaldo Koeman and elections for club president take place in March.
“Messi criticised the current president Josep Bartomeu, so if a new president is elected in March, perhaps Messi will decide to stay.
“Messi has his life in the city, his family enjoy living there and the fans have great affection for him. These are reasons to stay and perhaps with a new president, who understands Messi's needs and can persuade him that the club is heading in the right direction, can persuade him to extend his contract.
Rivaldo reckons Messi has the ability to play at the highest level for Barcelona well into his veteran years.
“He loves Barcelona, and nowadays players are fit enough to prolong their careers at the highest level, so I can see Messi playing for them until he's 38 years old," he added.
Last season, Real Madrid won La Liga with Barcelona in second. Tomorrow, the Catalan side begin their quest to claim the championship back when they take on Gimnastic in the opening round of the Primera Division campaign.