Well if the ref said that last week, he is 100% wrong.
This is section of the rule book dealing with it. Note the last part on "out of play" players:
SECTION 14 OFFSIDE
1. A player is offside except when he is in his own in- goal if the ball touches, is touched, held or kicked, by one of his own team behind him.
2. An offside player shall not take any part in the game or attempt in any way to influence the course of the game. He shall not encroach within ten metres of an opponent who is waiting for the ball and shall immediately retire ten metres from any opponent who first secures possession of the ball.
3. An offside player is placed onside if:
(a) an opponent moves ten metres or more with the ball.
(b) an opponent touches the ball without retaining it.
(c) one of his own team in possession of the ball runs in front of him.
(d) one of his own team kicks or knocks the ball forward and takes up a position in front of him in the field of play.
(e) he retires behind the point where the ball was last touched by one of his own team, or to his own in- goal.
“Out of Play” as opposed to “offside”
Players who are out of play at a play-the-ball (Section 11), a scrum (Section 12), a kick off or drop-out (Section 8) a penalty kick (Section 13) or a free kick (Section 13) are not put “onside” in the manner described in para 3 above. (See appropriate Sections).
https://www.nrl.com/portals/nrl/RadEditor/Documents/2017/arl-rules-book-2017-copy3-spc-1171219.pdf