UN Secretary General Ban Ki-moon said the attack on a school in Rafah yesterday, which killed 10 Palestinians who were sheltering there, was a "moral outrage and a criminal act".
Cameron told the BBC: "The UN has spoken very clearly and I think they're right to speak very clearly.
"International law is clear that it's completely wrong and illegal to target civilians, if that's what's happened."
Asked if he believed that international law had been broken, the prime minister said: "I'm not an international lawyer, so it's up to the international lawyers.
Also Read
Foreign Secretary Philip Hammond said yesterday he was "appalled" at the civilian casualties caused by the attack on the UN-run school.
The strike has sparked world outrage, with the United States calling for a "full and prompt" investigation and France saying it was "unacceptable".
Earlier today, Israeli Prime Minister Benjamin Netanyahu said "Israel does not aim its fire at civilians and is sorry for any attack that unintentionally hits civilians," without directly addressing the attack on the school.