President Carter set a foot outside the Rose Garden this weekend in his reelection campaign, and his two Democratic challengers promptly stepped on it -- trying to force the president into the political debate he has been avoiding.

But NBC quickly came to the president's rescue.

Carter, who has insisted for two months that he must forgo personal appearance because of the Iranian crisis, announced Friday that he will appear on the NBC interview television show "Meet the Press" next Sunday -- the day before the precinct caucuses in Iowa, the first round of the 1980 electron.

Carter's chief challenger, Edward M. Kennedy, heard about the president's plans yesterday and quickly told NBC that he would be glad to appear on the same show if the network were interested in getting the candidates together. California Gov. Edmund G. (Jerry) Brown Jr., then said he would like to be there, too.

NBC issued a polite "no thanks" to Kennedy and Brown, stating that both men had appeared on the program after announcing their candidacies and that the request to Carter "has been a long-standing one."

"I don't think there's any chance of it." Betty Cole Dukert. "Meet the Press" producer, said from New York. "We really have no choice. We really can't have the debate in 30 minues. We're really not a debate program." We're really not a debte program."

Since mid-November, Carter has waged a classic "Rose Garden" campaign, sticking close to the White House and Camp David while his challengers in both parties were out wooing voters.

Carter points out that he has to deal with international crises in Iran and Afghanistan; to do so, he says, it has been essential for him to stay in Washington.

It also has been good politics. The president has dominated the news and has reaped unpreceedented gains in the polls at his challengers' expense.

Two weeks ago, Carter dropped out of a scheduled three-way Democratic debate in Iowa.

He said then that it was important for him to stay close to Washington because of the international situation and added that he feels the need to "preserve national unity" until the hostages in Tehran are freed. "I can best do that," he said, "if I forgo personal appearances or participation in events which are exclusively part of a partisan political campaign."

Kennedy and Brown were clearly frustrated by Carter's withdrawal, and for two weeks both have criticized him for failing to offer Iowa's voters the chance to see the three candidates debate each other.

Kennedy's campaign staff, accordingly, was enraged when the word reached Kennedy in Iowa about Carter's plan to appear on the NBC program one day before the Iowa voting. "It's just brazen," a Kennedy aide said. "He stays in the Rose Garden except when he has a chance for national TV without us around."

And so yesterday morning Kennedy suggested to NBC that he be invited, too. "Since the president is able to take the time to appear on such a program," he said, "we could probably make it a debate."

At the White House, presidential press secretary Jody Powell said Carter considered his appearance on "Meet the Press" as nonpartisan, and an appearance with Kennedy and Brown would convert it into a political debate. Carter still does not think it appropriate to be involved in a partisan political debate, Powell said, but, "he does feel an obligation to keep the American people informed."