If the 'water table' rises then yes the well could flood the basement.
The water table is the natural underground level of water in your area, it drops in dry weather and rises in wet weather. If it rises to the point where it is above the basement floor you will get a flood.
We have a well in our cellar (in 250yr old house) the water supply is no longer drawn from it. In winter or during serious rain when the water table rises it would flood the cellar but we have a submersible electric pump down there and that pumps the water out into the field behind us when it reaches the sensor on the pump.
We have had up to 4 ft of water down there until we got a new pump installed!