All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His Slave and Messenger.
If this girl does not intend stimulating herself sexually and she does that only as an effect of the obsessive compulsive disorder as mentioned, then she is not sinful as a result of that. However, it is better for her to avoid doing that to the best of her ability and strive in treating her disorder by ignoring those compulsions and seeking refuge in Allaah, The Exalted, from Satan, and reciting the Ruqyah (Quranic healing). Please refer to Fataawa 5531 and 88705 for further benefit.
Allaah Knows best.