Rita Lavelle, chief of the Environmental Protection Agency's hazardous-waste cleanup program, was ordered to resign against her wishes last Friday by EPA Administrator Anne M. Gorsuch and may fight to keep her job, according to several senior agency officials.

Lavelle, under investigation by two congressional committees on charges including perjury, was summoned to Gorsuch's office Friday afternoon and sharply reprimanded for an unrelated matter: questioning the competence of EPA general counsel Robert Perry, with whom Lavelle and other top EPA officials have been feuding.

Sources said Gorsuch, angered by Lavelle's criticism of Perry, asked for her resignation. They said Gorsuch then presented Lavelle with a prepared press release announcing the resignation and containing purported quotes from Lavelle saying she had accomplished her goals at EPA and was eager to return to California.

Lavelle refused to comment yesterday, and Gorsuch could not be contacted.

A spokesman for Gorsuch denied yesterday that Lavelle's resignation was forced on her.

"That statement . . . was her statement. The quotes in there are hers," said the spokesman, who asked not to be identified.

The spokesman said Lavelle's resignation was oral. Two administration sources said over the weekend that she has not submitted a letter of resignation to President Reagan and that he has not accepted her resignation.

Some administration officials also questioned whether Gorsuch has the authority to dismiss Lavelle, a presidential appointee confirmed by the Senate.

EPA sources said that before firing Lavelle, Gorsuch visited the White House and the House Energy and Commerce Committee to notify them that she expected Lavelle would be leaving the agency.

The White House was unable to confirm yesterday whether there had been such a meeting with Gorsuch.

Several EPA sources said Lavelle spoke to the White House late Friday and has scheduled a meeting there this week to discuss her future.

Lavelle has strong ties to the White House, dating to Reagan's days as governor of California, when she worked for a time on his personal staff and became a close associate of presidential counselor Edwin Meese III, who attended her swearing-in last April 1.

Her White House connections were well known at EPA and a subject of some resentment there, according to several EPA sources close to Gorsuch and Lavelle.

Some of the same sources said friction between Gorsuch and Lavelle had been increasing, particularly as Congress has increased its scrutiny of handling of the agency's Superfund for hazardous-waste cleanup.

EPA sources said yesterday that Gorsuch does not believe she can count on Lavelle to be a team player, largely because of Lavelle's ties to the White House. They said tension between the two reached the breaking point when Gorsuch learned of the memo Lavelle had prepared several weeks earlier, harshly criticizing Perry.

Sources familiar with the memo said Lavelle wrote it for personal use and did not distribute it.

But the memo was leaked, apparently without Lavelle's knowledge, and Gorsuch and Perry became aware of it when asked to comment on it, the sources said.

At first, the two believed the memo had been sent to the White House, which Lavelle denied, the sources said.

The House voted last year to cite Gorsuch for contempt for refusing to honor congressional subpoenas for documents relating to EPA hazardous-waste investigations. Last Thursday, a federal judge denied a Justice Department attempt to block the House action.

A House Science and Technology subcommittee had announced last month that it was considering asking the Justice Department to seek a perjury indictment against Lavelle in regard to testimony concerning an employe critical of EPA enforcement efforts.

John D. Dingell (D-Mich.), chairman of the House Energy and Commerce Committee, had also warned Gorsuch last week that "we are reviewing allegations that the distribution of Superfund money has been manipulated for political purposes, and we are investigating allegations of misconduct and unethical behavior by an agency official."

EPA officials have said the committee is investigating allegations that the EPA held up funding for cleanup of a hazardous waste site in California because the agency feared such funding would help the senatorial campaign of then-governor Edmund G. (Jerry) Brown Jr. Other agency officials denied that the decision was politically motivated.

Congressional sources have said the investigation will continue.