First Lady Rosalynn Carter yesterday ruled out any debate between her husband and Sen. Edward M. Kennedy (D-Mass.) because the "appearance of disunity" is exactly what the Iranians and Soviets would like to see.

Arriving in Buffalo as part of an upstate New York campaign swing, she appealed for national unity during a Villa Maria College speech, which opened with some 1,000 singing "America the Beautiful."

"It is important for our country to be unified," she said. "The appearance of disunity is exactly what the Iranians and the Soviets want.

"To see a president arguing or debating on any issue appears to other people, in other countries who don't know our political situation, that we are disunified in our country," she said, adding that "anything that will prolong the time that our hostages will be held or anything that would endanger their lives is out of the question."

Earlier in Rochester, she said her husband would not "do anything that would endanger the lives of the hostages or encourage the Iranian government to keep them longer than they would anyway, thinking that something would happen that would take away from the support of the president in this country."

Informed of her remarks during a campaign trip in New Hampshire, Kennedy said, "The fact remains that the hostages have been held for 89 days now . . . [without] any real progress made toward releasing the hostages or seeingtheir safe return to the United States. I've offered what I thought was a constructive program," a reference to his proposal for a U.N. commission to investigate the shah.