The United States defended what it said were Israel’s “very real security needs” on Wednesday as part of a six-day hearing at the International Court of Justice on Israeli occupation of Palestinian territory. Diplomats and aid groups condemned the U.S. veto of a U.N. Security Council resolution that called for an immediate cease-fire in Gaza and the release of hostages.