A major failure of the cotton crop in Upper Egypt has created an economic dilemma for the created and is expected to lead to a new appeal for American economic assistance.

Agricultural experts are predicting a shortfall of 385 million pounds in the harvest of the medium staple cotton used in Egyptian textile mills.

Agricultural analysts said the shortfall means Egypt must either buy cotton from the Unites States to keep the mills here going or use its high quality long staple cotton, the country's principal foreign exchange carner to meet domestic requirements.

M. S. Zulficar, president of the state-owned cotton export organization said the probable decision will be to purchase about $36 million worth of American cotton to be used here for the manufacture of clothing, towels and domestic fabrics, and to continue exporting the long staple cotton used for finer quality fabrics.

"You can't use cotton grown for poplin shirting to make towels or galabeyas," he said, referring to the coarse, ankle-lenght robe worn by most Egyptian men.

Given Egypt's fragile economic position and shortage of hard currency, informed sources say the government is expected to ask the United States for help in financing the purchase of the American cotton.

"We hope for a decision soon so we can begin importing to keep the mills going." Zulficar said.

Agricultural experts say the crisis developed in this way: Egypt produces extra-long, long and medium staple cotton, in several varieties. The extra-long and long staple - the highest quality and the foundation of the country's export economy - are grown mostly in central Egypt and the Nile Delta. The medium staple cottons, used for coarser fabric popular in domestic consumption, are produced in upper, or southern Egypt.

While the long and extra-long varieties did well this year, upper Egypt was hit hard by an infestation of the cotton leaf worm, the traditional enemy of the Egyptian cotton farmer. In addition, Upper Egypt suffered an extremely hot summer, and a rising water table is increasing the salinity of the soil.

The result is that the medium staple crop is expected to be only about 132 million pounds, against an anticipated requirement of 517 million, according to unofficial figures. The country's total production of cotton is actually greater than last year's, specialists said, but still lower than expectations because more acreage was planted this year.

In 1974. the last year for which complete figures are available, exports of raw cotton brought in about $700 million, nearly half the country's total export revenue. The country cannot afford to divert this crop into its domestic textile consumption, nor can it afford the shutdown in the mills that might ensue if no substitute is provided for the medium staple Egypt cotton normally used in them.

The Soviet Union has traditionally been the biggest buyer of Egyptian cotton, but President Anwar Sadat recently ordered a halt to cotton shipments to the Soviets after a long decline in Soviet-Egyptian relations.

Zulficar said the effort to find new buyers was going well, and he anticipated little difficulty in disposing of the export crop.