This is from the BBC website on the incident. Neither a denial or a confirmation from the US. If they had evidence it was the Iranians they would say so. If the Israelis though the Iranians were using schools like Hamas they would say so. If the Iranians had evidence it was a US or Israeli bomb they would provide that. So likely an error from one side or the other but no way to confirm.:
On Monday, the BBC asked the US Secretary of State Marco Rubio if the school building was struck by an American missile.
"The US would not deliberately target a school," Rubio said in response. "We would have no interest, and frankly, no incentive to target civilian infrastructure."
"I don't have the details as to what led to it, but what is clear is that the United States would not target a school," he added.
In a statement reported in US media, Centcom spokesman Tim Hawkins said: "We take these reports seriously."
"The protection of civilians is of utmost importance, and we will continue to take all precautions available to minimise the risk of unintended harm," he said.