A U.S. Park Police officer riding in President Reagan's motorcade in heavy traffic in Montgomery County brandished a semiautomatic rifle yesterday to keep motorists from breaking into the line of travel, according to a reporter who saw the incident.

The officer kept the weapon, believed to be an AR-15, inside his police cruiser and never appeared to point it, according to Time magazine reporter Barrett Seaman, who was in the motorcade as part of a news media pool.

According to Seaman, the incident occurred about 4 p.m. over a stretch of about a dozen miles that included segments of the Capital Beltway and Rte. I-270. The president went to Camp David for the weekend yesterday by car rather than by helicopter because of fog around the mountain retreat.

A park police supervisor said last night he had had no direct confirmation of the incident. It "is not our policy to use weapons to get people to move," said Sgt. Michael Wood.

According to the pool reporter, the marked park police cruiser, which carried two officers, brought up the rear of the motorcade, behind vans carrying members of the media.

When a gap opened between the last vehicles and the main body of the motorcade, the police car moved forward to prevent motorists from moving into the gap and breaking up the motorcade, Seaman said.

Several times, when motorists appeared to be interfering with the motorcade, the reporter said, the officer in the passenger seat motioned them away with his right hand. "On a couple of occasions," he waved the rifle, which was in his left hand, Seaman said.