Masked Hamas militants dispersed protesters who gathered in northern Gaza to rally against the group.