Great question — answering as the UphillTech team:
The defensive player is committing a foul in the situation described. I am drawing here from the NBA rules, but high school and NCAA are essentially the same. Section I—Types A player shall not hold, push, charge into, impede the progress of an opponent by extending a hand, arm, leg or knee or by bending the body into a position that is not normal. Contact that results in the re-routing of an opponent is a foul which must be called immediately. Contact initiated by the defensive player guarding a player with the ball is not legal. This contact includes, but is not limited to, forearm, hands, or body check. EXCEPTIONS: A defender may apply contact with a forearm to an offensive player with...
Full answer by John Hunt: https://sports.stackexchange.com/a/25158 (CC BY-SA 4.0).
Need it done for your business? UphillTech.