Hi Leticia,
I just tried and failed to reproduce the problem on https://demo.moodle.net/. I logged in as an admin, added the online users block to the front page, edited the permissions, then logged out and logged in again as a student and couldn't see the online users block.
Perhaps you can try the same, and in doing so hopefully figure out what is different about your site.