Can a virgin get a molar pregnancy?

No. There must be union of a sperm and an egg to have a molar pregnancy. The molar pregnancy is an abnormality of the developing placenta. If a woman had artificial insemination and became pregnant and developed a molar pregnancy, she could still be a virgin. But there is no molar pregnancy without a pregnancy.
Molar pregnancy. A partial mole develops at either at conception (2 sperm fertilize 1 egg) or immediately after conception (1 sperm enters an egg and duplicates). A complete mole forms similarly but with an empty egg. So sex has to occur.