Thats not right, as mentionned
Quote: "an attacking player carrying the ball comes into
contact with the Referee or a Touch Judge or an
encroaching spectator in the opponents’ in-goal
and play is thereby irregularly affected.'"
But if the ball is kicked at the referee its a goal line drop out
Quote: "Drop-out from 4. The game is restarted with a drop-out by a
Goal line defending player from the centre of his goal line if(g) the ball or a defending player carrying the ball
touches the referee, a touch judge or an
encroaching spectator in the in-goal area and
play is thereby irregularly affected.
(h) the ball goes over the dead ball line or into touch
in-goal other than on the full from a kick off from
the centre of the halfway line .
(i) where a kick is made dead by a defending
player straddling the dead ball line or touch in
goal line.'"