As to a point of law...
[LAWS]6.A.5 Referee altering a decision
The referee may alter a decision when a touch judge has raised the flag to signal touch.
The referee may alter a decision when an assistant referee has raised the flag to signal touch or an act of foul play.[/LAWS]
And the referee cannot consult with 'others' (ie non ARs/TMO etc)... But there is nothing in the laws that says a referee cannot alter one of their own decisions all on their own. So if it ain't in the law then it can be done. For obvious reasons, I can see why you wouldn't have that as a law as it would be chaos if you didn't allow a referee to independently change their decision. (I'm sure we've all done it...I know I have...such as an incorrect arm out for the PK to the wrong team :redface
[LAWS]There is a law that says
6.A.4 The duties of the referee in the playing enclosure
(a)
The referee is the sole judge of fact and of Law during a match. The referee
must apply fairly all the Laws of the Game in every match.[/LAWS]
Obviously we want referees to be decisive, and I'm not advocating a referee to constantly change their mind (to lose players and spectators confidence), but if the referee can fix a monumental f@ck up of theirs before it's 'too late', and it's justified then in fairness to the players, I can't see that as a problem? Of course it will all depend on the situation and the multitude of variables around it.
One thing I learnt in my work life, is that it is fine to make a mistake, but it's not fine to do nothing about it when you know you made the mistake that can be fixed.