I use the "line across page" mostly to separate the header or footer text from the rest of the document. Although I am new to Pages, this seems to work:
Underline all the text in the last line of the header
Then, with your cursor just after the last character, press <TAB>
That should extend your underline all the way across the page. For the footer, I put a blank line with a small font as the first footer line then press the underline button and <TAB>. This puts a line all the way across the top of my footer section.
I am sure there are other (better?) ways of doing this, but I am new to Pages. I wish there were something akin to Microsoft's "border" button to put lines above/below/left/right of my text paragraphs...