Isn’t the ref a part of the court? It seems like I have seen the ball bounce off a ref and play continued.
So one time in intramural basketball the ball was headed out of bounds and a ref picked it up in bounds without blowing a whistle and I went and took the ball out of his hands and yelled “ref is part of the court” and went and made a layup. The ref was ticked and did not award me the basket.