I'm not a Moodle programmer, and won't give you a direct technical solution.
But you should take time to understand the way Moodle handles "rights" for people. It's all based on capabilities!
And you should test and rely on these rights : the rights the user has (or not) on a precise capability, in a specific context (your block).
Roles are only a way to group rights on capabilities, and affect them on specific contexts...
Hope this helps,