WASHINGTON (AP) _ The Supreme Court today agreed to decide whether a Montana man convicted of fondling a child may be forced to attend a therapy program for sex offenders.

The court said it will review a ruling that said requiring Donald Imlay to receive treatment would force him to admit guilt and violate his right against self-incrimination.

Imlay was found guilty of sexually assaulting a 7-year-old girl at his Great Falls, Mont., grocery store on April 11, 1989. The child said Imlay, 56 at the time, had fondled her.

A judge sentenced Imlay to five years in prison, but suspended the sentence on the condition he attend a counseling program for sex offenders.

A psychologist who examined Imlay said he was severely depressed and was suffering from post-traumatic stress syndrome. The judge concluded that Imlay was not dangerous and was not likely to molest anyone again.

Imlay attended a sex-offender program six times over a six-month period but continually denied he had assaulted the young girl. The social worker who was counseling Imlay said it was pointless to continue the therapy because Imlay refused to admit guilt.

The therapist recommended that Imlay be confined as a patient for further treatment. The only such program in Montana is at the state prison.

A state judge then revoked Imlay's probation, ordered him to prison and said he should not be paroled until he completes the sexual-offender treatment program there.

The Montana Supreme Court ruled last June that forcing Imlay to attend the treatment program would violate his right against self-incrimination because his attendance demands an admission of guilt.

''It is clear that the only thing the defendant has failed to do is admit that he committed the crime for which he was convicted,'' the state court said.

The state court said such an admission could prevent Imlay from appealing his conviction and might expose him to prosecution for perjury, since he testified at his trial that he was innocent.

A state judge then reimposed Imlay's prison sentence. And he was sent to prison, but not required to attend the treatment program there.

Montana officials, in the appeal acted on today, said requiring Imlay to get therapy would not violate his rights.

''The therapist wanted answers to questions concerning only the crime of which Imlay had already been convicted and sentenced,'' the state officials said. Requiring him to answer them would not expose him to any new or additional prosecution, they said.

Montana's appeal was supported by law enforcement officials from Alaska, Connecticut, Delaware, Idaho, Indiana, Kansas, Kentucky, Maine, Maryland, Missouri, Nevada, North Dakota, Pennsylvania, South Carolina, South Dakota, Utah, Vermont, Virginia and Wyoming.

The states said the Montana Supreme Court ruling could be used to foreclose treatment for other convicted defendants, such as those required to attend programs for drug or alcohol abuse.

The case is Montana vs. Imlay, 91-687.