TL;DR: the book is oversimplifying, presumably in order to avoid getting you to understand subtler and more complex parts of grammar
while also giving you simple rules. It's more complex than that. As to
your final questions/examples, the first is correct, it's not used
adjectivally, it's used genitively, and the -'s applies to "a week"
rather than to "week". The second is wrong, because 'a' is also acting
like a number, so you'd be saying "one two weeks' pay", which is
nonsensical because there's only one noun to which either 'one' or
'two' could be attaching, and it makes no sense for it to have them
For a full explanation, read on...
When you want to use a foreign language for formal writing - and academic writing is generally formal - you want to have nice clear rules. If your command of your own native language is largely confined to informal dialects, and you find yourself needing to conform to expectation of formal language, it's easier to fit into the expectations if they can be expressed as a series of straightforward rules.
Unfortunately, English doesn't work like that. Grammarians in previous centuries tried to set down definite rules of grammar, which is where we get ideas like "you should never split the infinitive" or "they must always be semantically plural as well as grammatically plural". Never mind that these rules are broken in celebrated literature that existed and was well-known when the grammarians were coming up with rules.
You see, the languages that educated people learned to prove they were educated, like Latin, were taught as having extremely structured, very formal grammars with clear rules, and some people felt that English should have similarly structured, formal, well-defined grammar. Unfortunately, in practice English just doesn't work that way.
So, to actually get to the point of your question, the "Saxon genitive" -'s, which most native speakers just think of as the "possessive" (because it is mostly used to indicate possession, though possessive pronouns work differently and some instances of -'s aren't genitives at all, but contractions of is), as nothing to do with whether or not articles are being used. It has to do with the grammatical role that the various words are taking.
In "a three-week vacation", three-week is acting as an adjunct noun, also known as an attributive noun, to the noun vacation. The author of the text you are reading calls that the noun functioning as an adjective, but it is a distinct form that one might try to describe simply in that way, but behaves differently in a number of ways. In this case, the adjunct noun means it is a vacation lasting three weeks, while in the phrase "trouser press" it means a press for trousers.
In "three weeks' pay", the time period is filling the role of a genitive - the pay is that which came from or relates to three weeks. Most native English speakers will think of it as a possessive, even though three weeks can't actually possess pay, and it just makes sense when you manage to think of it that way.
What really matters here, in terms of knowing what's going on, is what role the article is playing, however. In "a three-week vacation", the adjunct noun combines with the noun to create a noun phrase, "three-week vacation". The article is thus bound to the whole noun phrase, and if you didn't care about the duration you could drop "three-week" and say "a vacation", meaning that the article is essentially bound to "vacation", not "three-week". In "a week's pay", contrast it with "three weeks' pay", and you will see that the article can be seen as acting as a number. It might be replaced with "one". That is a false trail, though, as seen in the phrase "a night's sleep", which simply means the amount of sleep corresponding to a night. You can also say "two nights' sleep", but that doesn't imply twice the sleep per se; rather it means two separate nights of sleep. The important point is that the article is bound to the 'week' or 'night', rather than the 'pay' or 'sleep', and the genitive suffix semantically applies to the word plus the article (or quantity). It might even apply to a whole phrase, where it forms a noun phrase - such as "Queen Mary University of London's student population" - the "student population" of "Queen Mary University of London".
Ultimately, your examples actually illustrate rules about attributive nouns, rather than rules about the genitive suffix - just one of those rules has to do with the genitive. Where you have an attributive noun, it never takes the genitive suffix, and it is never plural. That's why it's "a three-week vacation", not "a three-weeks vacation". I would caveat, though, that there may be exceptions to those 'never's, because I'm not sure there are any universal rules in English at all. Also, noun phrases usually get turned into a compound when used attributively, as in "three-week" there, or "two-foot pole" (a pole two feet long). However, not everyone will actually write the compound with a hyphen in all cases.
Lastly, in your final examples you want clarity on, the first is correct and the second incorrect. The genitive is appropriate because it is the pay related to, corresponding to or belonging to "a week", or "two weeks", and thus both are correctly using the genitive. A genitive is distinct from an adjunct noun. They are two different grammatical constructs that serve two different - albeit somewhat related - roles. The second is wrong simply because you should never have an indefinite article in front of a number acting as a number of something. You can "go on a two-week vacation", because the 'two' is part of a compound noun acting in the attributive role, so it is not acting directly as a number - the article is binding to the "two-week vacation". In "a two weeks' pay", both "two" and "a" would be trying to bind to "week", and that would not be possible. On the other hand, you can say "a two" on its own, because you could be referring to a number, digit or glyph. "What was the result of that dice roll?" "A two."
Hopefully all that extra detail didn't confuse you, but I think it's easiest to remember this stuff and get it right if you really understand it.