President Carter left Washington and many of his troubles behind him yesterday for an old-fashioned, small-town Southern political rally with crowds unabashedly delighted to see a president.

It was the kind of day when the president seemed free to joke about even his most embarrassing problems - like the Peter Bourne drug affair - and to poke fun at even his greatest liability here in tobacco country, Joseph Califano and his antismoking crusade.

The crowds cheered when they were supposed to and laughed when they were supposed to and when it was over the obviously delighted president took off his coat and moved into the crowds for a round of campaign-style handshaking.

It was undoubtedly the best therapy for a troubled politician. The president is faced with worrisome public opinion ratings, resignations and troubles with his legislative program.

This was solid Carter country in 1976, as he kept reminding the crowd yesterday. But his support has been significantly eroded, in part because of Califano's antismoking campaign.

"I had planned today to bring Jose Califano with me," he said in reference to the secretary of health, education and welfare. "But he decided not to come. He discovered that not only is North Carolina the No. 1 tobacco-producing state, but that you produce more bricks than anyone in the nation as well."

To gales of laughter, Carter added that Califano "did encourage me to come, though.He said it was time for the White House staff to start smoking something regular."

"I would like to say a word in his [Califano's] defense," the president said, "because as I am a farmer, as I am deeply interested in the small farmers of this nation, as I am deeply committed to a fine tobacco loan program, obviously I am also interested in the health of America."

TO underline his words, the president visited a tobacco warehouse in Wilson and watched a tobacco auction staged for his benefit. The warehouse held more than 20,000 pounds of highgrade tobacco, enough for more than a million cigarettes, according to local tobacco officials.

The official purpose of Carter's visit was to lend support to North Carolina Democratic Senate candidate John Ingram. Ingram faces a difficult campaign against incumbent Republican Jesse Helms, one of Carter's most effective conservative opponents on Rhodesia question. But to many, if only for an hour or so, it seemed more like a 1975 rally for a trouble-free candidate Carter instead of a problem-plagued incumbent President Carter.

Reverting to his old campaign theme. Carter said, "America is a religious nation. North Carolina is a state whose familites, whose communities, are centered around the church. No matter what your own beliefs might be, we know that God teaches us to care for others . . ."

There were, however, plenty of reminders of his incumbency in addition to the thrilled crowd. There were signs against the Equal Rights Amendment, against American policy in Rhodesia, against U.N. Ambassador Andrew Young. And there was a continuous chant from demonstrators urging him to "free the Wilmington 10," who were convicted after racial violence in Wilmington, N.C., in 1971.

And tobacco was on everyone's mind. His references to it drew the loudest responses. There were signs all over town supporting it, and some members of the White House staff dashed around in hats passed out by the R.J. Reynolds Tobacco Co. emblazoned with the phrase "Pride in Tobacco."

There were also numerous plugs by the president for his record on unemployment, his Civil Service reform and his farm policies.

Earlier in the day, Carter visited Norfolk where, with all the pomp and ceremony of his office, he dedicated a $260 million guided missile cruiser.

The ship, the USS Mississippi, prompted reminiscences by the president about his service on the battleship Mississippi when he was a Navy lieutenant.

Carter's foray yesterday into out-of-town campaigning was his first in more than a month. He is planning political appearances in New York. Missouri and Ohio in the coming weeks.