Yes, Medicare should cover both olaparib and rucaparib. But it's good to confirm with your doctor that your medical situation is fully covered.
You should also note that Medicare may not cover PARP inhibitors to the same extent as commercial insurers. The 2021 study cited above noted that the median out-of-pocket cost for PARP inhibitors was more than eight times higher ($370) for people on Medicare.