The rumors circulating through Patchogue-Medford High School on Long Island were as ghastly as they come: a group of students, it was whispered, had stolen three skeletons from a local cemetery, dressed one up as Darth Vader and taken them to a party.

The whispering got so loud that a teacher overheard it. School officials contacted the police, who said yesterday that they had arrested three teenagers in connection with the prank. ''One of them was talking at school, bragging at school about the incident,'' said Detective Lt. Edward P. Reilly, commander of the Suffolk County Police Department's fifth squad. ''There was talk in the school that the bones may have been brought to a party.''

Officials said that a teacher had overheard the talk about the Darth Vader mask, but that the teenagers they interviewed had not confirmed it. In any event, they said, dressing up a skeleton does not constitute a separate offense.

Two 17-year-olds, Michael Herz and Michael Sossi, were charged with one count each of body stealing, opening a grave and first-degree cemetery desecration, all felonies. A third teenager, Patrick O'Rourke, 19, was charged with receiving a stolen body, a misdemeanor. All three pleaded not guilty and are free on bail.