A PDF is an end-stage document that is not intended to be reverse-engineered back to a traditional word-processing document.
Adobe Acrobat Pro and other paid PDF Editors can generate Word (.docx) documents from a PDF, but you should be prepared to perform additional cleanup in the document. Microsoft Word v16.31 or later can open and convert a PDF back to a Word .docx document with the same cleanup caveat.
Although MS Word supports line numbers, Apple's Pages does not since it is not a Word clone. Any features unique to Word that are not implemented in Pages will be dropped when Pages opens that Word document and translates its content into a .pages document. You cannot edit a native Word document in Pages.
I suggest that whatever approach mentioned above that you take to generate a Word .docx document from that PDF, you restrict yourself to MS Word for cleanup and editing. You can regenerate a PDF from that Word Save As… menu.