Michael K. Deaver argued vigorously at a meeting of senior White House staff members in early 1985 that the United States should move toward resolving its dispute with Canada about acid-rain pollution, former White House communications director Patrick J. Buchanan said yesterday.

Testifying at Deaver's perjury trial here, Buchanan recounted a brief but intense debate that erupted when Deaver, then White House deputy chief of staff, warned that failure to address the issue could turn a forthcoming summit with the Canadians into "a communications and public relations debacle."

"At that point, {budget director} David Stockman went ballistic, as they say," Buchanan said. Stockman said the issue was a closed one and raised fears of having to spend $5 billion to clean air pollution along the Canadian border, Buchanan said.

Deaver is being tried on charges that he lied about his contacts with high-ranking administration officials after he left the White House and became a lobbyist. He is accused of attempting to conceal his involvement in White House discussions of the acid-rain issue from investigators.

In the staff debate, Deaver held his ground, Buchanan said, adding, "He was very forceful."

"Damn it, Mike, this thing is a closed issue," Buchanan said Stockman countered at one point. "It's going to cost us a lot of money. It's not worth it."

Deaver's arguments were based on what Buchanan, now a newspaper and television commentator, called "the politically valid point" that a failed summit between President Reagan and Canadian Prime Minister Brian Mulroney would harm Reagan's image.

Stockman countered with arguments related to spending, Buchanan said. "It's going to cost us $10,000 for each fish we save," Stockman fumed, according to Buchanan.

Buchanan's appearance was among the highlights of the 12th day of testimony in Deaver's trial, which had been suspended for a week while the defendant was hospitalized for removal of a kidney stone.

Deaver, 49, appeared pallid at times yesterday. He waved his hand in a shaking motion when asked how he felt and looked weak in the afternoon session.

During the afternoon, prosecutors evoked an image of Deaver conducting some of his lobbying business with the help of his White House ties.

William H. Timbers Jr., an investment-banking executive who had hired Deaver's firm to work on behalf of a Puerto Rican tax program, testified that he once had to reach Deaver by calling a White House telephone number and giving the code word "Foxtrot."

Timbers, a first vice president of Smith Barney Harris Upham & Co. Inc., said he was puzzled by the call because Deaver appeared to be on an aircraft, admonished Timber that he was not speaking on "a secure line" and quickly terminated the conversation.

The mystery was cleared up minutes later when White House photographer MaryAnn Fackelman-Miner testified that "Foxtrot" was the code name for first lady Nancy Reagan's aircraft and that Deaver and his wife were aboard as Mrs. Reagan's guests when she flew to Boston and then to Martha's Vineyard for a vacation in August 1985.

The photographer said Deaver took several telephone calls during the flight.

That and a photograph of a White House meeting that Deaver said he did not recall attending were the central points made by prosecutors yesterday.

Buchanan was unable to fix the date of the spirited staff meeting and said prosecutor Whitney North Seymour Jr. had suggested that it might have been March 6, 1985. Other evidence has suggested it could have been the day before. The difference is crucial.

Deaver has said in grand jury testimony that he remembers first participating in acid-rain discussions that March 6. Prosecutors have alleged that he was a participant in such discussions on six previous dates.

Buchanan, winking at reporters from the stand, proved to be as outspoken a witness as he is a political commentator. Seymour initially had to caution him to answer "one question at a time" and, when Buchanan had difficulty fixing the date of the staff meeting, Buchanan tried to assume the role of questioner.

"That's my recollection. Is it faulty?" he asked Seymour to the amusement of U.S. District Court Judge Thomas Penfield Jackson and the jury.

Jackson handed prosecutors a setback when he refused to allow them to introduce a paragraph from a National Security Council memorandum dated March 1, 1985, that reportedly described Deaver as "clearly . . . agitated" over the acid-rain issue and threatening to "go to the president over the issue."

The judge held that the paragraph, written by council staffer Tyrus W. Cobb, was "hearsay on hearsay" because Cobb was unable to say if it was based on his first-hand observation of Deaver's actions at a meeting Feb. 28, 1985.