An animated and exuberant President Carter announced here yesterday that he will sign the $18.6 billion tax cut bill when it reaches his desk in Washington.

Speaking at an outdoor political rally, Carter asked hundreds who stood amid the beach palm trees, "Do you want a government that cuts your income taxes?"

The crowd answered with cheers and the president, after mentioning the recently enacted tax cut legislation, asked, "When I get back to Washington and get that bill, do you think I should sign it?"

The crowd roared its approval again and Carter added, "I'll take your advice. I've decided to sign it."

The president's decision to sign the bill came as no surprise, although until yesterday his top aides had refused to rule out the possibility of a veto.

There was also a certain irony in Carter's enthusiastic announcement of his decision, since only two days ago, during his nationally televised anti-inflation speech, he said he would oppose further tax cuts next year because they would be inflationary.

Campaigning in this heavily Jewish area for Democratic gubernatorial candidate Robert A. Graham, the president also stressed his role in the Middle East peace negotiations, promising that "I will help when my help is needed."

"I pray," he added, "that before Christmas I will be going to the Middle East to sign a peace treaty that will bring permanent peace and good relations between Israel and Egypt."

Graham, a wealthy developer and former state senator, was one of three millionaire Democratic candidates Carter campaigned for yesterday in two states.

Thousands of people turned out in damp, overcast weather earlier yesterday in Nashville to hear Carter invoke the names of a string of Tennessee political heroes before urging support for Jake Butcher, who is running for governor, and Jane Eskind, the Democratic Senate candidate.

It was Butcher, a wealthy East Tennessee banker and friend of former federal budget director Bert Lance, who was principally responsible for the president's decision to stop in Nashville en route to the campaign appearance yesterday in Miami. But it was Eskind, who trails in her race against Senate Republican Leader Howard H. Baker Jr., who made the brief stop politically sensitive for Carter.

Seven months ago, when the president's political fortunes were near their low point, Baker provided crucial support for the Panama Canal treaties, helping the White House gain its first significant legislative victory. But Baker's stand on the treaties has hurt him politically in Tennessee and Eskind has sought to exploit deep feelings on the issue by denouncing the treaties.

White House officials danced around the subject when asked why Carter would choose to inject himself in the Eskind-Baker race under these circumstances.

Presidential press secretary Jody Powell said the president came to Tennessee "to campaign for the Democratic ticket - all of them - the way he's done it in every other state."

Democratic National Committee Chairman John White said Baker's record of cooperation with the administration "was not a consideration."

Speaking in a public square near the state capitol, Carter invoked the names of Tennessee Democrats from Andrew Jackson to Estes Kefauver before getting around to endorsing the two statewide candidates.

THe president, who recently referred to Sen. Floyd Haskell (D-Colo) as "a national treasure" destined to become governor. Of Eskind, he said: "She's tough, she's competent, she knows government, she'll come (to Washington) with a clear eye and a clean-sweeping broom. She has cast her lot with the little people."

Carter's appearance in Nashville was his first in public since he announced his new anti-inflation measure on national television Tuesday night. He did not dwell on the subject, but ended his speech with an appeal for public cooperation.

"I want to ask your promise - will you help me with our anti-inflation program to control inflation in the country? Will you help me?" the president said.

The crowd responded with mild applause and a scattering of cheers.

According to White and others travelling with Carter, Butcher is ahead in a closer race against Republican Lamar Alexander, a former Nixon White House aide. They concede that Eskind trails Baker but insist that her situation is not hopeless.

Baker, who wants a big win to boost his 1980 presidential prospects, also was in Nashville yesterday, campaigning in one of the city's suburbs while Carter talked to the downtown crowd.

Ron McMahan, the Tennessee Republican's press secretary, said Baker is "comfortably" ahead of Eskind with about a 14-point lead in his own polls. He also shrugged off the importance of Carter's visit to Nashville.

Baker "has assumed for months that Carter would be coming in ," McMahan said. "He understands how the political system works."

As for the impact, he said Carter will "create enthusiasm, raise some money and steal the headlines for a day, but in the long run I don't think it will make much difference."

The wife of a successful stockbroker, Eskind does not lack for financial resources. By the end of the campaign she plans to spend about $1.1 million. Butcher's spending will be close to $4 million.