Donald Trump and a leading figure in the Israeli army have suggested a ceasefire in Gaza could be close.