At any time during the existence of any lease of state lands, except lands leased for the purpose of mining of valuable minerals, or coal, or extraction of petroleum or gas, the lessee with the consent of the department, first obtained, by written application, showing the cost and benefits to be derived thereby, may purchase or acquire a water right appurtenant to and in order to irrigate the land leased. If such water right shall become a valuable and permanent improvement to the lands, then, in case of the sale or lease of such lands to other parties, the lessee acquiring such water right shall be entitled to receive the value thereof as in case of other improvements which have been placed upon the land by the lessee.