Yes, it is possible. There are two different functions depending on what you want to do. If you want to set the order during setup you can use
this function It is being used in step-46. If you want to control the p-refinement yourself, you can use
this function. The order of the finite element will be changed during the refinement.