Petroleum engineers design and develop methods for extracting oil and gas from deposits below the Earth’s surface source.
The planet Earth is surely not the only celestial body that may have deposits below the surface that are worth extracting. I think it may be possible to find a research group or laboratory that would see such a project on topic. Probably ice on the Moon may be between the first "deposits" to target.
You probably cannot do that without a rocket if you start from being on the Earth.
The problem is elsewhere. Will the institution you are going to graduate from be able to provide for you the adequate help, assistance and supervision? Doing just on your own seems risky. If your home institution does not have much experience on space mining, they may only pass your work at amateur level. Such a work will not be valued by different other institutions of any kind you may face later. Also if the scope is restricted to "extract exactly oil and gas", little can be done because these resources have biological origins and unlikely to be present in places like Moon.