Referee can show yellow after viiewing monitor, althouhg it's quite rare. It happened a few times in 2018 World Cup, including for Ronaldo against Iran. It also happened with Mazic in 2017 Confeds Cup final (I thought that one was a clear red.)
Referee clearly didn't see what Fred did so think...