Rapid economic and societal development increases resource consumption. Understanding how to balance the discrepancy between economic and social water use and ecological water use is an urgent problem to be solved, especially in arid areas. The Heihe River is the second-largest inland river in China, and this problem is notable. To ensure the downstream ecological water use, the “Water Distribution Plan for the Mainstream of the Heihe River” (97 Water Diversion Scheme) controls the discharge of Yingluo Gorge and Zhengyi Gorge, while the “Opinions of applying the strictest water resources control system” (Three Red Lines) restricts the water use. With the development of the economy and agriculture in the midstream, Zhengyi Gorge’s discharge cannot reach the Heihe River’s ecological water downstream. This paper is under the constraints of the “97 Water Diversion Scheme” of Heihe River and the “Three Red Lines” of the total water use control index for Zhangye County. We constructed a water resource allocation model for the midstream of Heihe River to reasonably allocate water resources in the Heihe River’s midstream and downstream. This model is divided into three parts: Establish the mathematical equation, simulate the water consumption under the different inflow conditions, and ensure each water user’s demand. The result showed that if we fail to confine total water consumption in the midstream, through the reasonable allocation of water resources, the real water use and water consumption of the middle Heihe River will be greater than the “97 Water Diversion Scheme” and the “Three Red Lines.” If we confine water consumption, they will be within the “97 Water Diversion Scheme” and the “Three Red Lines,” at the same time, they can reach the downstream of the Heihe River’s ecological water. Besides, under the premise of satisfying the economic water and ecological water downstream of the Heihe River, returning farmland to wasteland and strengthening water-saving measures will improve water efficiency and be more conducive to allocating water resources.