You can't block someone from a marking contest. You can, however, shepherd the ball if it's within 5m.
Which means that if Fogarty was blocking his opponent, his actions were illegal until the ball hit the ground - at which point they became legal.
It wasn't a marking contest, the umpire was calling play on as the ball was in flight - as the umps often do if the ball wont be reaching 15m.
Just checked the vision from the goalpost camera angle the ump is waving his arms playon as the ball in the air approaching the goal line.