One thing about so called laws of war.
They never work.
In the field most troops have no supplies or infrastructure to deal with POWs.
The ones that survive were either part of organized surrender or they somehow got close enough to the rear where the infrastructure and supervision do exist.
Technically every civilian on occupied territories can be charged with abetting the enemy, treason, terrorism etc.. Which does not change the fact they need to somehow eat and work, even if its related to the occupying army. Which is the only institution that keeps the local economy alive.
So every Okinawan who gave up a sword or performed any form of labor until the official surrender in theory is liable... but again, war is when laws should be replaced by common sense.
Every military will pass laws which make it illegal for occupied population to own a knife or sickle or axe. Not because it wants all farm equipment to be surrendered. Because normal ways to render justice do not work. If a soldier kills a local, if villagers are not scared enough, they'll all testify the soldier was a demon and they have no idea why he killed. It was just random evil. Soldiers will testify they were under assault by the locals. The way such things should be resolved is there is a snitch who always informs about what really happens in the unit.
Suppose there is not one.
Banning anything sharp means you simply look if there was anything like that on the scene. Sickle? Ok, it means there was an assault and the whole village is hostile. Nothing? Soldiers might have been something weird.
I still don't believe US occupation authorities were after every ancestral blade even if the official statement was that all swords are banned.
Did they send out armed parties to secure every sword in every village? No? They were not serious.
It was just a standard position to make sure they can dispatch any paralimitary weapon-bearing entity at will.
Which quickly turned into a great souvenir hunt and Japanese law enforcement being more obedient and more inclined to do things by the letter than most.