The appreciative millionaires, dressed in western garb, sat on hay bales. Merle Haggard, the ex-convict who rose from boyhood poverty to fame as a singer, entertained them with renditions of "Working Man's Blues" and "Pennies From Heaven."

The most famous of the land-rich millionaires was President Ronald Reagan, who flew in by helicopter from his own nearby mountaintop retreat for the concert yesterday at a cattle ranch once owned by his longtime Hollywood friend, actor Jimmy Stewart. While Stewart wasn't present, the guest list included a variety of other veteran actors, among them Fred MacMurray and Buddy Ebsen. Another guest was Reagan's premier political fund-raiser, Holmes Tuttle, who brought along his English butler.

Country and western music star Haggard, who has never had a butler or a servant of any kind, was the star of the show, the third in a series of White House concerts introducing young artists. Reagan praised Haggard for playing "music that reaches the heart of America" and said his art was "rooted in the creativity that can only come from freedom."

Haggard won his own freedom from San Quentin Prison in 1960, paroled at the age of 22 after a term for burglary and a short stint in solitary which, he subsequently said, gave him a glimpse of hell. It was Reagan, as governor of California, who gave Haggard, by then a famous singer, a full pardon in 1972.

Reagan's prepared remarks after the performance praised Haggard and his indigenous American music. But, as the president's aides often have found to their dismay, Reagan rarely stops with what has been written for him. As he left the stage, the president was prompted to recall a cattle-cutting demonstration he had witnessed earlier in the day, in which a trained horse forces a cow away from the herd.

"And I want you to know that I leave here inspired," Reagan quipped. "I cannot wait to get back on Capitol Hill."

But if Reagan was looking forward to applying these techniques in Washington, his security men were already putting them into practice yesterday. To keep reporters from asking the president questions or interviewing the guests, the press pool that had been watching the cattle-cutting event was bolted into a cattle pen, where they remained while Reagan and his friends dined on barbecued steak, chili beans, red wine and plentiful pitchers of beer.

This unusual measure--the success of which prompted deputy White House press secretary Larry Speakes to quip that he'd like to take the cattle pen back with him to Washington--is part of an evolving and carefully planned attempt to keep Reagan as far away as possible from reporters at all times, even when there is no question of his physical security.

Though Reagan was as safe at yesterday's remote and well-guarded location as he is ever likely to be, aides didn't want him "making news" by saying something off the cuff about the budget or El Salvador. And the mood of isolation at this barbecue and concert at Rancho Sierra Grande, the cattle and horse spread now owned by millionaire Stu Gildreth, was reinforced by the host's awareness that the guests did not want to be pestered.

Gildreth, understanding this but also wanting a record of the event, hired his own television crew to film the proceedings up close.

The one substantive question asked of Reagan yesterday was parried by his wife, Nancy. When the president was queried on whether he would take any action to reduce the defense budget, the first lady said she would prefer to talk about cattle, not normally her favorite subject. Reagan added: "Let's not even think about that until we get back there to Washington ."

Today the Reagans will wind up a week-long western trip, which has been divided into two days of speeches, four of vacation and one of travel.

Haggard demonstrated both versatility and a sense of history in his appearance here. He recalled that the last president he had played for was Richard Nixon, in the year he was forced to leave office--and he said that if anything happened to Reagan, "blame it on me."

Among the artists the 44-year-old Haggard introduced for the program, which was filmed for broadcast on PBS, was Mark O'Connor, a country fiddler who at age 12 was described by Roy Acuff as "a genius." O'Connor, now 20, is considered by many critics to be the best fiddler among country-music artists in the country today.

At the urging of operatic singer Beverly Sills, who introduced him, Haggard also showed the far-ranging quality of his musical talents. He performed "Pennies From Heaven" in the big-band style of the late 1930s--a style and sound that Haggard predicted soon will return to American music.

He also brought out the songs that made him famous, among them "Okie From Muskogee," with its implied criticism of youthful opponents of the Vietnam War that attracted favorable attention from Nixon and George Wallace. But the Haggard numbers also included "Rainbow Stew," a contemporary comment which falls far short of being a raging endorsement of Reaganomics.

Nancy Reagan praised Haggard's music as "down-home, down to earth and downright fun." She also said: "To the viewers at home let me say, if you hear bellowing in the background that is not my husband and Congress debating the budget. It is the sound of cattle."