Water laws vary widely from state to state. What may be legal in NY may not be somewhere else and vice versa. If you're trying to find out without calling attention to it, try asking an independent well driller.
Legal or not, it could be dangerous. Remember the little girl years ago who fell into a well and it took hours and hours to rescue her? This well should at least have a hinged lid that can be locked. If the well supplies drinking water, I'd be concerned about how sanitary it is as well. Anyone could drop anything down in there and contaminate the water supply.
Certainly not in current sanitary standard! An animal could fall in and ROT in the water. You could use it for garden but beware for drinking and bathing. Find a well guy. Maybe he can put a proper cap on top, then you chlorinate it and you're good to go. Plenty of water in it, that's good!
It definitely needs a cap on it to keep kids,animals and junk out of the well. It looks like it's well tile below with an extension of galvanized culvert on the top. Contamination will depend on what's around and above it. If that is a concerned have the water tested by an independent lab, not some company that has something to gain from selling you something besides the test.