For those who stayed here in the face of nearly a week of dire reports of the nuclear peril just down the road, the arrival of President Carter today bore elements of one of those just-in-the-nick-of-time rescue scenes.

They turned out, more than 1,000 strong, to cheer the president, who rode into town in a black limoushine to assure everyone that all was well. And when he left, most of them went home more confident than they had been all week. Few of them saw the evacuation buses beginning to roll in.

But for a while today the nearly ceaseless cascade of ominous warnings lifted. Instead, the president told nearly 200 reporters in Middletown borough hall that he had gone to the beleaguered Three Mile Island nuclear plant to see for himself. The situation, he said, was "quite safe for all concerned."

Almost as a counterpoint to the president's warnings that residents might have to leave when the experts begin tinkering with the balky nuclear reactor, the crowd outside cheered and applauded while Rosalynn Carter moved through them, ofering reassurance.

That was enough for Fred Lych. The 16-year old Middletown high school student was in a freshly pressed uniform of the Union Hose Co. Rescue Squad No. 1, directing traffic for the president's visit.

"The president of the United States doesnht just walk into a danger area without knowing what is going on," said Lynch. "It kind of makes you feel confident."

Many of the people who live here have left. There was a yellow sign on the door of St. Peter's Lutheran Church this morning announcing that, for the first time anyone could remember, services had been canceled. The pastor was gone along with his scattered congregation. Lynch said he took his 71-year-old grandmother out of town too.

But Middletown's mayor, Robert Reid, made a quick tour of his community today after the president's speech. He returned to the borough hall wearing his son's blue-and-gold football jacket and a smile.

"I talked to people and this has really made them feel good after all the bad news," he said. "At last we're getting guidance on what is really happening from the people who are pulling the strings."

While he chatted, the first of 81 long, yellow school buses ordered here for a possible evacuation began lining up behind the borough hall.

Almost as an after thought, Reid mentioned that he sent his wife and 12-year-old son to Connecticut this morning. "I guess I've got enough on my mind as it is," he said.

If Middletown's spirit was being buoyed by all the attention, it was a far different matter down the highway at Elizabethtown in neighboring Lancaster County.

Elizabethtown, a borough of 5,00, is on the downwind side of Three Mile Island, about seven miles away. It would be among the first to be hit with radiation if a disaster occurred.

But no special people were visiting the borough today. Few residents were on the streets. The police department was locked. Some citizens were putting suitcases in cars, just in case.

Some of them got an odd, queasy feeling a week before the accident at Three Mile Island last Wednesday. They received bright yellow cards from the county commission, telling them what to do in case of an emergency at the nuclear plant.

Tina Smith thought it a strange co-incidence. She and a friend were standing on a ccorner, scanning the sky with a tiny device for taking radiation readings. It read negative.

Her husband of three months, David Smith, gave it to her and told her to keep it handy. He has worked at Three Mile Island for three years - he was there today - and Tina was worried.

"He can't believe it's happening to them," she said. "He wants me to keep the bags ready to go. I'm concerned. I don't mind him working over there, but I love him. . . ."

Throughout the five counties most directly affected by the emergency, schools were announcing closings for this week and clubs were canceling meetings.

Many stores closed because their employees had left the area, and some larger restaurants limped along with partial staffs.

Radio stations filled the air wtih news of developments at the plant, but even at that, many people complained about the continuing uncertainty and confusion of the information they were receiving.

"I never had any worries about that plant before," said Henry H. Leonard in Middletown. "But I don't know what the hell to think. And I stayed up until 1 a.m. listening to the news."

Leonard was able to joke about it a little, just as many others have reacted with good humor to the grimness that has hung over them since the accident.

A disc jockey caught it adroitly. After a mournful tune, he announced it was Fats Domino singing "Blue Monday" on a "happy Sunday."