Defense Department officials have told Rep. Michael D. Barnes (D-Md.) that an unauthorized Soviet army official ordered a partial military alert in August, two days after President Reagan's joke about bombing the Soviet Union, but that the order was quickly countermanded, according to an aide to Barnes.

Barnes asked Defense Secretary Caspar W. Weinberger for an explanation after a leading Japanese newspaper reported that the Soviet Far Eastern Army issued a coded signal saying it was going into a state of war with the United States, but withdrew the signal 30 minutes later. The newspaper Yomiuri Shimbun said the signal was issued from the Soviet port of Vladivostok to a nearby troop unit and was intercepted in Tokyo.

The action followed Reagan's joke during an Aug. 11 radio test that he had signed legislation that "outlaws Russia." The president added, "We begin bombing in five minutes."

A Barnes aide said that National Security Agency officials recently told Barnes in a briefing that "a wayward operator" in the Soviet army had issued an alert for the troops he commanded. The NSA officials said it was a lower-level official who was not authorized to issue such alerts, and that the order was countermanded by his superiors, according to the aide.

"They referred to it as a non-event," the aide said. "It sounded like an event to me."

Yomiuri Shimbun reported that U.S. and Japanese forces responded by going on high alert and that the Japanese ordered checks on Soviet troop movements. But the Barnes aide said the NSA officials denied that U.S. forces had gone on alert.

The NSA officials did not dispute that the incident was related to Reagan's joke but questioned why it would have occurred two days later, according to the aide.

Pentagon officials had no comment last night.