Ralph’s father is a naval officer. But where is the war in the rest of the novel?
I think you can see the influence of war here and there in the novel, though Golding doesn't give any real details of it. That said, the book came out not long after World War 2, so Golding's initial readership would have known exactly what to understand by the few hints that Golding gives.
Here's one of the moments where you see the influence of a wartime background on the boys, from Chapter 1:
Ralph shrieked with laughter. He jumped up.
Piggy clasped his hands in apprehension.
“I said I didn’t want—”
Ralph danced out into the hot air of the beach and then returned as a fighter-plane, with wings swept back, and machine-gunned Piggy.
There's another interesting moment when, at the first assembly, Piggy reveals how the plane has come to crash;
“The plane was shot down in flames. Nobody knows where we are. We may be here a long time.”
The very fact the boys are on the island is because of the war. And don't forget, it's an armed naval ship who rescues Ralph at the end:
A naval officer stood on the sand, looking down at Ralph in wary astonishment. On the beach behind him was a cutter, her bows hauled up and held by two ratings. In the stern-sheets another rating held a sub-machine gun.
And that's without going into Jack's rise to power and Roger's sadism, and making comparisons to Hitler and Mussolini. I'd say the war is undoubtedly an ingredient in Golding's novel.