The book is correct. For the reason why level 6-9 spells exist for the warlock when their Pact Magic slots cap at 5, check the Mystic Arcanum class feature on PHB p.108.
At 11th level, your patron bestows upon you a magical secret called an arcanum. Choose one 6th level spell from the warlock spell list as this arcanum.
You can cast your arcanum spell once without expending a spell slot. You must finish a long rest before you can do so again.
At higher levels, you gain more warlock spells of your choice that can be cast in this way: one 7th-level spell at 13th level, one 8th-level spell at 15th level, and one 9th-level spell at 17th level. You regain all uses of your Mystic Arcanum when you finish a long rest.
It’s simulating the once-a-day spell slots that other casters get (presumably, they didn’t want you recasting a 9th level spell every time you rested throughout the day), but there are a few minor differences.
- It’s not technically a spell slot for anything that cares specifically about spell slots (such as the feature below that in the PHB, Eldritch Master), as mentioned.
- Unlike most spellcasters, you only ever “know” (as an arcanum) one spell each of 6th-9th level.
- You cannot ‘upcast’ spells to those 6th-9th level ‘slots’, as they aren’t really slots. As an example, if you knew shatter as one of your usual Pact Magic spells, you could only cast it with one of your standard spell slots (likely a 5th level slot by the time you have Mystic Arcanum, barring other spell slot levels being available due to multiclassing or the like); you could not expend a use of Mystic Arcanum instead to cast shatter at spell level 6+.
- Similarly to point 3, you always cast the 6th level arcanum at 6th level, the 7th level arcanum as 7th level, etc. You could not, for example, upcast a circle of death chosen as your 6th level arcanum to your 8th level arcanum ‘slot’; that 8th level arcanum can only be used on whatever spell you chose for that level, such as glibness.