How to insert horizontal line to page headers in Apple Pages
Insert a line, move it on the page into the header box (this is easier if you have layout visible - VIEW / SHOW LAYOUT)

Make the line a section master (ARRANGE / SECTION MASTER / MOVE OBJECT TO SECTION MASTER)