FIRST LADY Nancy Reagan has agreed to a guest appearance opposite 14-year-old Gary Coleman on NBC's sitcom "Diff'rent Strokes." The show, to be aired March 19, revolves around youth drug abuse, a cause Mrs. Reagan has adopted.

Mrs. Reagan will not be paid for the brief return to acting, which is her first professional role since she costarred with Ronald Reagan in "Hellcats of the Navy" nearly 30 years ago. The only other time a first lady agreed to a role in a TV show was in 1975, when Betty Ford telephoned Mary Richards on "The Mary Tyler Moore Show."

The 4-year-old, popular "Diff'rent Strokes," a sentimental comedy about a rich white man and two cute black orphans he has adopted, always contains a message for kids interspersed with slapstick humor. It airs at 8 on Saturday nights.

Coleman, a pint-sized loudmouth with a fast delivery, is always at the center of the plot and involved in one crisis or another. This time it's his rejection of drugs that attracts the first lady, who will play herself.

"The reason Mrs. Reagan agreed to appear on the show was because the show reaches millions of young people," said Mrs. Reagan's press secretary, Sheila Tate. "It is an excellent opportunity to communicate to children about drug and alcohol abuse . . . We wanted to have a story line that was appropriate for her to be involved in . . . Before accepting, we had to assure ourselves that it was a serious effort to educate children."

According to a recent Hollywood Reporter, "Diff'rent Strokes" is the most popular show with children between the ages of 6 and 11. Tate said the show's exposure figured into the White House decision.

The White House was first approached last November, when the show's producers requested that Mrs. Reagan tape a short antidrug message from Washington to be inserted in one of the segments. Mrs. Reagan was already familar with the show, but Tate said she provided the first lady with a tape of an old segment.

"Their original proposal was very modest, but we thought her presence at the studio all day would make her role more meaningful," said Tate. "We talked about it for a week or so after receiving their letter and Mrs. Reagan was very enthusiatic."

The show will be taped March 10 at Universal Studios in Burbank. The Reagans will be on the West Coast for Queen Elizabeth II's state visit. Officials of the studio plan to meet Tuesday morning to discuss security and publicity.

"We are very happy," said Howard Leeds, an executive coproducer of the show. "People are so busy you don't ever feel they have the time for something like this . . . She obviously believes in the nature of the program . . . I think they were very happy with the product. Their demands were only that the story be honest and not fakely dramatized for the sake of commedy."

Tate said the White House made some final changes in the script last week when the Reagans were in California.

The half-hour segment featuring Mrs. Reagan will be called "The Reporter" and revolves around a citywide story-writing contest that sixth-grader Coleman enters. In order to become guest editor at a mythical New York City newspaper, Coleman has to come up with a sensational story. The principal will be the contest judge.

After considerable deliberation, Coleman discovers his grade school peers are popping pills and using all sorts of illegal drugs. He gets his story, writes it and submits it. The principal, of course, refuses to believe this is going on in his school and accuses Coleman of fabricating the story.

On his own, Coleman takes his story to the New York paper, which prints it.

Enter Nancy Reagan.

She just happens to be in New York that day and takes her copy of the paper to Coleman's home, a Park Avenue penthouse where he lives with his rich dad, step-sister, brother and housekeeper.

According to Leeds, Coleman then brings Mrs. Reagan to school with him and introduces her as his friend. At this point she delivers her antidrug message. All very serious sounding, but Leeds guarantees laughs.

But, that's as far as he'll go. The rest is top secret.

"We have some funny stuff for her to do, and we hope she'll agree," says Leeds. "It should be a lot of fun and a lot of good lines between her and Gary."

Will Coleman use his now-famous gruff but hilarious line on the first lady: "Whachu talkin' about, Mrs. President?"

"It almost seems mandatory, doesn't it?" said Leeds. "But that's all I'm going to say."