The referee is correct in law, but I'm not sure his coach is going to be praising him. One of those where you need to look at why the law was brought in, and it was to stop timewasting where a player about to be subbed is sent to the far touchline and then ambles off to waste time. I don't believe his team was winning here and may have even been losing, and he certainly wasn't ambling off and was moving reasonably quickly.
Once the referee tells him to go off the other side he has to comply, but I'm not sure he needed to tell him. By the time he does this it would almost certainly be quicker to let him run off to the technical areas than get him to stop, and then explain that he has to go off the other side.