In an attempt to restore his flagging authority, President Abol Hassan Bani-Sadr today asked for -- and apparently received -- from Aytollah Ruhollah Khomeini the power to name a new prime minister now.

Bani-Sadr's unstated objective was to name a prime minister before the expected clerical sweep to a majority in the parliamentary elections. The delayed runoff for the assembly election is scheduled for Friday.

Permission to appoint a prime minister was part of a three-point package of requests contained in Bani-Sadr's letter to Khomeini, Iran's most powerful figure, and made public by the offical news agency Pars. The president also spoke about the need to confront decisively plots and incidents affecting the country.

On the basis of lengthy talks with the ayatollah's son Ahamd, Bani-Sadr requested the following:

Permission to appoint a prime minister subject to the ayatollah's approval.

Guarantees that security forces would act according to orders.

Guarantees that the "propaganda" organizations would not act against the national interest or policy of Iran.

With Khomeini's blessing, Bani-Sadr apparently was counting that the new government named by his prime minister would win the required confidence vote when the new parliament gets down to business sometime next month despite the virtually certain clerical majority.

Ever since his landslide presidential victory on Jan. 25, Bani-Sadr has been thwarted by the Islamic clerical party in efforts to form a government and wield effective power.

The clerical party has insisted he wait until the parliament functions to exercise his authority and claimed that constitutionally the prime minister's job -- which it hopes to control -- is more important than the presidency.

Since the Nov. 4 seizure of the U.S. Embassy hostages caused the downfall of provisional prime minister Mehdi Bazargan's cabinet, Iran has functioned without a normal government structure under the guidance of the badly divided Revolutionary Council.

Front-runner for the prime minister's job was Adm. Ahmad Madani, a tough, law-and-order advocate who would be expected to restore efficiency to the ranks of the demoralized armed forces and Revolutionary Guards. Madani, a former defense minister and Navy minister who received 15 percent of the presidential vote in January, was received today by Khomeini.

But Bani-Sadr's move was followed by a series of confusing events, retractions and clarifications that suggested continued power struggle between the president and his right-wing clerical rivals of the Islamic Republican Party.

Symptomatic of the confusion was Khomeini's own last-minute televised appeal -- that someone else read for him, prompting speculation that the 80-year-old leader is once again in poor health -- calling tonight for massive backing for religious candidates in Friday's vote.

By simultaneously backing both Bani-Sadr and his clerical rivals, the ayatollah appeared to be inconsistent, something that a confusing sequence of events this afternoon tended to underscore.

After the publication of Bani-Sadr's letter, Khomeini's own aides quickly confirmed its content and the ayatollah's approval. Yet within a half hour, Pars sent out a message instructing editors to hold the original dispatch. It gave no explanation.

Khomeini aides then promised but failed to produce, a statement on the matter. Nor did they approve the lifting of Pars' embargo in the dispatch concerning the prime minister. Bani-Sadr's office, however, later approved the release of the original Pars dispatch.

Nothing of this was mentioned on the main evening radio and television news program. Although this was not the first time that decisions meant to be kept secret were released, analysts here noted the extreme care Bani-Sadr employed in his letter to avoid just such embarrassment.

The president justified his call for a Khomeini-approved prime minister by invoking "the conditions of the country and the need of a decisive confrontation of plots and incidents."

He stressed that the letter's terms were "the result of long negotiations" with Khomeini's son Ahmad, who since his father's illness last winter has become increasingly influential.

The letter also said that the security forces should follow orders. This was widely interpreted as an apparent allusion to the Revolutionary Guards' ignoring cease-fire instructions in Kurdistan recently or acting as shock troops against leftists in recent disturbances on university campuses.

Its other provisions said that "propaganda" organizations must not act "against the national interest and the policies of the Islamic Republic of Iran."

Over the months Bani-Sadr has complained of the lack of balance in government-run radio and television which until recently have been in the hands of his clerical rivals.

These are familiar Bani-Sadr themes, but ones which have been finding increasing popular support as he has proved incapable of fighting what he terms "rival decision-making centers."

Bani-Sadr has ben stymied by the clerical party on everything from transferring the American hostages to government control to adoption of his ambitious radical and social reforms. European and Japanese adoption of economic sanctions has left in tatters his hope of freeing Iran from the superpowers and replacing their influence by that of Europe and Japan.

His last-minute effort to form a government before the clerical party formally won the parliamentary majority was underpinned by claims that the revolution was in danger of renewed U.S. attacks in the wake of the ill-fated hostage rescue operation two weeks ago.