f there is a municipal water supply Normally yes you must use it BUT some localities do allow the use of a well for water supply if you can prove
1- The water in this well is of potable quality
2- It is a hardship to use the municipal water due to excessively long runs of water main piping.
Check local codes by the way Rain water is NOT normally considered potable water do to air pollution