The Barcelona forward posted a picture of the national team on his official Instagram page, which has close to 51 million followers, and wrote that "a lot of a****** will appear to talk s***".
Neymar subsequently apologised for the post, which came shortly after a 1-0 defeat to Peru brought Brazil's Copa America campaign to an end and saw head coach Dunga sacked.
Rivelino, part of the heralded side that won the World Cup in 1970, has slammed Neymar's attitude in the wake of a hugely disappointing campaign in the United States.
"It would have been better for him to shut up," he said, speaking on TV Cultura programme Cartao Verde. "This is something which has marked his career, it's not good for him.
"He's an excellent player, but I think his preoccupations have to be more about things on the pitch than off it.
"I think that the biggest idiot in this story is him. You have to construct a story in order to be able to speak.
"He hasn't won anything, he hasn't given joy to the supporters, so he can talk less.
"You have to build your story first, try to give a trophy to the Brazilian population, and then you can start to complain a bit."
Neymar was left out of the squad in order to be available for the Olympic Games in Rio de Janeiro in August.