Any city or village, any county on behalf of a county sewer district and any town on behalf of a town sewer district or sewage disposal district may, in addition to all other powers possessed with respect to the construction and development of sewage facilities, provide for the construction and development of capacity in excess of its own needs for conveyance, treatment and disposal of sewage for the purpose of conveying, treating and disposing of sewage of another public corporation or improvement district, and, any provision of law to the contrary notwithstanding, may contract indebtedness for such purpose. The term “public corporation” as used in this article shall mean a public corporation as defined in the general corporation law.