Yes but he was retreating - infact he was kinda running past rather than standing infront of the kick.
I don't actually have a problem with the yellow but having watched this game I was curious when this was given and he had allowed other offenses like shirt pulling, kicking the ball away etc which are of a similar level of offending go without cards.
That's for me where he didn't do very well.
Difference here is expectations of how the referee is meant to manage the infringements
"However, an opponent who deliberately prevents a free kick being taken quickly must be cautioned for delaying the restart of play."
http://theifab.com/laws/free-kicks-2018/chapters/free-kick-offences-and-sanctions-2018
While those other situations, the referee doesn't have to show a card. He can either verbally warn, call a foul or show a caution. So comes down to his man management. What the Auckland City player did, he has to be shown a card.
Also yes he was retreating and again if ball was then kicked into him, he would of been fine, instead he stuck his leg out to prevent the kick.