The Supreme Court agreed to decide yesterday whether a person convicted of murder committed during another felony can receive consecutive prison terms for the two crimes.

The District's Public Defender Service, which brought the question to the high court, contends that such sentences in "felony-murder" cases are unconstitutional because they punish a defendant twice for a single offense.

The Justice Department did not oppose Supreme Court review of the issue, which has divided both the U.S. Court of Appeals here and high courts in several states.

The District case arose from the 1972 murder, rape and robbery of Rebecca A. Rieser, a 26-year-old Interior Department marine biologist and computer scientist who had moved to Washington from Pittsburgh a month before her death.

Thomas W. Whalen, now 33-years-old and an inmate at Lorton Reformatory, was convicted of the crimes, which occurred in the victim's apartment at the McLean Gardens complex in northwest Washington. Whalen was a janitor there.

Whalen's sentences, imposed by a D.C. Superior Court judge, included 20 years to life for felony-murder-in this case murder in connection with rape-and a consecutive term of 15 years to life for rape. Thus, he faced up to 35 years in prison.

Whalen challenged these sentences on the ground that they violated the constitutional guarantee that no person shall "be subject for the same offense to be twice put in jeopardy of life or limb . . ."

Specifically, his lawyers from the public defender service contended that the consecutive sentences impermissably put Whalen in double jeopardy because the rape charge and the felony-murder charge actually constitute one offense.

In November 1977, the D.C. Court of Appeals upheld the consecutive sentences.

The court acknowledged that the charge of rape was an "element" of the charge of felony-murder. But, it ruled, the two charges did not merge into one, as the public defender argued, because each was based on a law intended to protect different societal interests. "The underlying felony (rape) . . . serves a more important function as an intent-divining mechanism," the local appeals court said.

In its petition for Supreme Court review of the case, Public Defender Service lawyers W. Gary Kohlman and Henry W. Asbill said, "In every felony, the underlying felony 'merges' into the felony-murder conviction."

For purposes of deciding whether Whalen was exposed to double jeopardy, they also said, he committed only a single offense, felony-murder, because it has "all the elements" of the additional charge of rape.