Moyes is right and wrong here. He's right in keeping him grounded and making sure he works on his game, but he doesn't need to be so vicious about it.
He's wrong in how he's saying it though. He's basically saying that no matter how well Ross plays, Osman will play when fit, which is the wrong message to send out to a young player. Players should be selected on performance, and there's no reason whatsoever for Leon Osman to come straight back into the first team right now, because he's been lacklustre lately and Ross has just put it a great performance against a top side.
He should have said something like "the lad put in a great shift against a top side, he has a way to go before he cements a first team place but he's doing the right things - it's up to him to carry on doing those things and giving me selection headaches".