I'd suggest checking with your doctor or polyclinic about this, because pelvic pain in the third trimester can sometimes need specific assessment to see what's causing it and whether you'd qualify for medical leave. From what I know, maternity leave rules are quite strict, but if your pain is significant enough that your doctor feels you need to rest, it's worth having that conversation with them and seeing what documentation they can provide to your employer. Definitely worth asking, especially since you still have a few weeks before delivery.
only your gynae can advise you on this as every woman's pregnancy condition differs