Straight questions deserve straight answers: no, he is not allowed to do that.
Now, having said that, a few considerations. You need to understand the context and why he is doing that. I'll speculate a bit so give me some rope here, but I'm pretty sure my margin of error is small. Whether you were onside or offside is, for the lack of a better word, irrelevant. He thought you were offside and acted on that. He is allowed to be mistaken. Deal with it.
In his mind, he was doing you a favour. He had two options, to penalize you on the spot or to stop you from chasing and allow the play to continue. He chose the latter. Even then he is still wrong as he should have never touched you. Minor cost to keep the game flowing in his mind.
The obvious question becomes, is there anything you can do about it? Very little. You would need to escalate the thing biblically and, let's call a spade a spade, nor worth it.
I understand how frustrating it can be, but one of the biggest lessons you'll learn from the sport is to overcome adverse and unfair situations.
A word from the coach at halftime might help, but it could also backfire. I wouldn't do anything official about this.