In order to prevent waste and to conserve the supply of water, a municipality which owns and operates a water utility, or has granted a franchise for the operation of a public water system, may by ordinance regulate and restrict the use of water.