Where in the world have you found any indication that any international law makes any distinction between defensive and offensive war in terms of annexation of land?
That rule was brought about by the UN Security Council Resolution 242.
And funnily enough, nobody objected when Egypt annexed Gaza, and Jordan annexed the West Bank in 1948.
As far as the international law is concerned, Israel was completely in the clear to annex the entire place until 22nd of November, 1967. After that it gets a bit murky.
That still doesn't change the fact that the entire idea of an independent Palestinian state happened because Israel just didn't annex it all in 1967.
But going back to the UNSC Resolution 242.
> Termination of all claims or states of belligerency and respect for and acknowledgment of the sovereignty, territorial integrity and political independence of every State in the area and their right to live in peace within secure and recognized boundaries free from threats or acts of force
There are still no recognized boundaries of Palestine, and there sure as hell weren't in 1967. The original UN Partition Plan for Palestine was adopted, but the problem with its adoption is the fact that it was a General Assembly resolution, and the problem with General Assembly resolutions is that they are notoriously non-binding, and thus not worth the paper they are printed on.
Which brings me back to my initial point that the international law just doesn't matter, because technically speaking, the original Partition Plan was settled international law. Worked out great in practice.
> And funnily enough, nobody objected when Egypt annexed Gaza, and Jordan annexed the West Bank in 1948.
What many people don't realize is that, though no nation objected to the Jordanian annexation of the West Bank, no nation acknowledged it either. The Jordanian annexation of the West Bank was accepted by one nation in the entire planet: Iraq. Note worthy that Iraq's king and Jordan's king were brothers.
Noteworthy as well, that while the West Bank was in the hands of Arabs, there were no calls for establishing an independent Palestinian state there. Same in the Gaza strip.
And while I'm on this soapbox, I might as well mention that Jordan was part of the Mandate for Palestine. The Mandate for Palestine divided the land into two entities: Mandatory Palestine which was decided by the British to be the 23% of Palestine designated for the Jews, and Jordan which was the 77% of Palestine designated for the Arabs - the same idea of partition that the UN came up with 27 years later. Only difference being that the UN plan partitioned the 23% designated for the Jews further. And yet in both cases the Jews accepted and the Arabs violently ethnically cleansed the lands of Jews. And before anybody mentions the racist idea "it's Arab land" (is Great Britian white man's land?) it should be clear that Jerusalem was Jewish majority for a century before that time.
Nobody called for a Palestinian state in the West Bank during 1948 to 1967 because everyone in power at the time was aware that there already was a Palestinian state in the Land of Palestine: The Kingdom of Jordan.