- We spent a three-week holiday... (article, hyphen, no apostrophe)
- We spent three weeks' holiday... (no article, apostrophe)
- We spent three weeks holiday... (no article, no apostrophe)
This is really a question of style rather than grammar. The use of the apostrophe was once considered necessary because the phrase was thought to be possessive. It is now more often seen as attributive, and many modern styles do not use the apostrophe.
But all three of the above are correct.