President Reagan moved forcefully today to squash speculation that he planned to fire Environmental Protection Agency Administrator Anne M. Burford, saying she can have her job "as long as she wants to."

Reagan, responding to questions as he toured a lumber mill here, also was asked whether he still had confidence in Burford, whose resignation is being sought by members of Congress concerned about controversy surrounding the agency's toxic waste cleanup program. He replied simply, "Yes."

His remarks appeared to be directed as much to his staff as to the media. White House aides had been hinting broadly this week, mostly on a not-for-attribution basis, that they thought Burford had become a liability to Reagan and ought to resign.

Tonight, however, in a reversal of this talk, a senior White House aide issued a statement saying, "The president meant what he said today when he remarked that she could stay on as long as she likes. He is simply not of a mind to ask her to go. He has absolutely no plans to ask her for her resignation or to relieve her of her duties."

The aide continued: "Of course there have been discussions within the staff about her; that is only natural. But the president makes the decisions and he is still in her corner, and that is all that counts as far as we are concerned."

Reagan's staff on several occasions has had difficulty budging him on an issue and today's byplay may have been another example of that. And, as he demonstrated last year when he overrode the recommendation of his chief of staff and kept his controversial labor secretary, Raymond J. Donovan, Reagan is reluctant to fire members of his Cabinet and staff.

In addition, there may be tactical reasons for the posture the White House adopted tonight. Reagan may not want to appear to be deserting a member of his administration in time of stress. And the more pressure that is put on Burford, the harder it may be for her to step aside.

The president's remarks and the senior aide's statement came at the end of a day that began with Reagan aides saying with increasing firmness that Burford would be fired, perhaps early this week, if she didn't resign.

White House officials said Burford's future probably would be considered in a White House meeting Monday or Tuesday with the decision coming soon afterward. One official expressed the hope that Burford would "make it easy on the president" by offering her resignation.

On Friday the Justice Department said it could no longer represent Burford in her contempt-of-Congress case in court or in the six congressional investigations of the EPA. Now her reported response to the Justice Department announcement has become an important point in the dispute.

Burford was reported to have said Friday that, since Justice no longer was defending her, she felt free to turn over to Congress without restriction disputed agency documents that she earlier had been ordered to make available only under certain circumstances.

"There's no way the president can tolerate this insubordination," said one official. "He would be seriously weakened if he did."

Donovan's response under fire last year was to express unyielding loyalty to Reagan, whom he praised and never contradicted. This was important because, while tolerant of lapses, Reagan is known to be sensitive when aides make remarks that can be taken to be critical of him.

Some key White House officials said they think that Reagan will be persuaded to act on Burford's tenure because she has taken issue with his view on executive privilege and is also believed to have made critical remarks about him in private.

White House officials were reluctant to say anything today for attribution because they are also concerned that the president might react negatively to their recommendations if it looks as if he is being stampeded by the press.

So, officials who think that Reagan will accept a recommendation to ask for Burford's resignation early next week are concerned that press coverage of this prediction could have an effect on the outcome.

Nevertheless, key administration officials are operating on the assumption that Burford will leave, one way or the other.

They confirmed the existence of a list of possible replacements, including John R. Quarles Jr., deputy EPA administrator in the Nixon and Ford administrations. Speakes denied the existence of such a list in his briefing Friday in San Francisco. One official said this was because the list had not been circulated among the top aides in the White House, even though some knew it existed.

On Air Force One en route to Washington tonight, presidential counselor Edwin Meese III said that dismissal of Burford has not been discussed in "formal or informal meetings."

"There is no list compiled, requested or authorized" on a replacement, Meese said. "There is no need for a list." Asked if the EPA controversy has hurt Reagan politically, he said, "If there is damage, I don't want to cause any further."