The White House again found itself defending President Reagan yesterday from a charge that he had become inattentive and uninterested in his job, but this time the president got support from a surprising quarter -- the man who triggered the latest furor.

Both presidential spokesman Marlin Fitzwater and James Cannon, the Republican aide who became so worried about Reagan last year that he mentioned in a memorandum the possibility of removing the president, sought to play down the significance of Cannon's action, disclosed in a new book.

Fitzwater said the source of the concerns about the president's ability to govern was grousing by aides to Donald T. Regan, the presidential chief of staff. Regan was ousted after the Iran-contra affair, and his aides were likely to lose their jobs as well.

"It's total nonsense," Fitzwater said of the charges. "It speaks more to the state of mind of some of the staff here than it does about the president."

"No truth at all," the president shouted to reporters as he walked back to the Oval Office from a late morning briefing in the Old Executive Office Building.

Cannon, who was an aide to former chief of staff Howard H. Baker Jr., said much the same in a telephone interview from Atlanta. Cannon acknowledged that he had raised the issue in a brief memo to Baker as the former Tennessee senator prepared to assume his White House position in late February 1987. But Cannon said they quickly dismissed the issue after seeing the president.

After he saw Reagan, Cannon said, "It was obvious that it was not Ronald Reagan who had the problem; it was those White House staff people."

"Part of a staffer's job is to see what the worst case may be," he said. "This was the worst case we'd have to raise. But it was perfectly obvious that Ronald Reagan was fine."

Cannon said he had picked up concerns about Reagan from "about 15 to 20" members of the White House staff who Baker asked him to interview before becoming the president's top aide. He then drafted a memo suggesting that Baker might consider invoking the 25th Amendment to have the vice president and Cabinet remove Reagan from office.

Cannon declined to name any of the staff members, but said, "They were mostly Regan loyalists, but there were others as well."

The critics were people who should have been in frequent contact with the president, Cannon said. "That's why I took it seriously . . . . They were saying he isn't playing any attention . . . . He stays in the mansion. He's not doing his job."

Fitzwater described the president "as conducting business as usual" during that period, but acknowledged that the White House was not filled with optimism after the Iran-contra affair, which is often described as Reagan's most serious political crisis. "It was no day at the beach, that's for sure. But, on the other hand, the president was just fine. He was in every morning and everything was going fine," Fitzwater said. Cannon's memo to Baker was mentioned in the prologue to "Landslide: The Unmaking of the President: 1984-88" by Jane Mayer of The Wall Street Journal and Doyle McManus of the Los Angeles Times. The book indicates, however, that Cannon did not take the concerns about Reagan's mental state seriously after he met the president.

"What the hell is going on here? Cannon wondered. The old fella looks just dandy," the book concluded. "And, through it all, Ronald Reagan always did."

It was the not the first reference to concerns about the president's state of mind during the Iran-contra affair. In his book "Behind the Scenes," former Reagan aide Michael K. Deaver said that Baker arrived at the White House warned by the staff that he might have to invoke the 25th Amendment, but said Baker discovered a president who was alert and engaged.

Speaking in Lexington, Va., yesterday Baker confirmed that his aide voiced concerns about the president. But Baker said he immediately found Reagan to be "the most presidential man I've ever known" and said the question of Reagan's competence never came up again.