Based on what you wrote, it sounds like you are committing a blocking foul...nobody here can know for sure without seeing the play.
However, if you keep getting fouls called when you take these approaches there is a really good chance the officials working your games consider your actions to be in violation of the rules and, as a result, deem a foul has been committed. Therefore you are left with two options...foul out of games and/or see you playing time limited or learn a better way to play defense.
I do applaud you for wanting to learn more about the rules of the game and their application.