Two Montgomery County elementary pupils will be tested for AIDS after they came in contact with a used hypodermic needle they found while waiting for a school bus in Rockville yesterday morning, according to county school and health officials.

Health officials said it was unlikely the children -- second- and fourth-grade boys at Beale Elementary School -- had been infected with the virus that could lead to the deadly acquired immune deficiency syndrome. But, they said, intravenous drug users are known to be at high risk for AIDS and the disease can be transmitted through needles.

"I doubt very much if the children will get it," said county health officer Martin Wasserman, "but imagine what the mothers have to be going through today." Wasserman disclosed the incident yesterday as he updated the County Council on plans by his department to deal with Montgomery AIDS cases.

School officials plan to send letters detailing the incident to all parents of Beale pupils, and to hold an assembly at Beale today to explain to pupils the danger of picking up foreign objects, said school spokesman William Henry.

The incident occurred yesterday at 8:25 a.m. in the 700 block of Lenmore Avenue in Rockville, according to police and Henry. Henry said the boys were waiting for the bus when the second grader picked up a needle, described as used and without the syringe.

Henry said the boy allegedly stuck the needle in the thigh of the fourth grader and, in the process, might have jabbed himself. The mother of the fourth-grade pupil saw the incident and called police and school officials.

Henry said the boys were immediately sent to the school nurse, who examined them and found no puncture wounds. "We are unsure if the needle punctured the skin," Henry said, but added that the boys would be screened for AIDS and would receive a vaccine against hepatitis B, another disease common to drug users, as a precaution.

Wasserman said the needle would also be tested but it is unlikely it would show definitively whether the human immunodeficiency virus that leads to AIDS was present. He said the county would work with the families to reassure them, provide them with information and deal with their concerns. He said another set of blood tests would be taken in about two months to see whether HIV was present.

Henry said the incident might prompt the school to institute a system-wide instruction. Henry said school policy, which is set by state education law, does not allow AIDS education at the elementary level, but does not prevent teachers from responding to pupils' questions about AIDS.