As whole or partial consideration for any privileges obtained by a district under any contract with the United States, any rights-of-way or rights to water or to the property owned or acquired by the district may be conveyed by the board to the United States insofar as they may be needed for the construction, operation, and maintenance of works by the United States for the benefit of the district pursuant to such contract.