Code enforcement “officers” normally are not sworn law enforcement.
In a town of under 2000 the code enforcement officer is also the policeman if they have a policeman. If the town is much smaller he may also run the library when the librarian is on vacation.
I wonder if this story appears anywhere else.