Senior IDF commander says measures such as banning entry to Israel for work, medical treatment or worship used to discourage further attacks but can only be a temporary fix