When the ball is on the ground a player is allowed to block/obstruct an opposing player from getting to the ball with the body, it's called boxing out and completely legal, the ref was wrong and a bad call.