Defense Ministry says army units will deploy to secure areas as terror group retreats to east of river, facilitating return of civilians