Partly it depends how deep your well and how intact your well casing. If it is an older (or just shoddy) dug well, with no or imperfect casing, then there may indeed be an issue.
Most places that have zoning, require livestock to be kept some setback distance from wells (here, it's 60 ft) for exactly this reason. Bacteria or nitrates get into your well, they can mess up OTHER peoples' wells in the same aquifer too.
So, having chickens cooped, or free-ranged, in the general vague vicinity of a good intact well, sure. Penning them right close by the well, or on top of it, especially if it's a dug well or has 'issues'... probably not smart, not for you NOR your neighbors.
Have fun,
Pat