There are actually three answers to your question:
- If you use the number "1001" as a literal number you are correct and the numbers should be written out and be spoken like you say. For instance: my library: 998 books, your library: 1001 books.
Ich habe neunhundertachtundneunzig Bücher, Du hast (ein-)tausendeines.
- If a number has a number of consecutive zeroes so that very different powers of ten are spoken adjacent to each other it is allowed and not unusual to add an "und" to make pronounciation of the number more fluent. Compare:
1000001: "eine Million und eins".
This happens the more regularly the more adjacent zeroes there are. "Eine Millioneins" for the above would not be wrong but rather unusual *). "Tausendundeins" (instead of "tausendeins") is a border case.
- There is a fixed phrase about "tausend und ein [Ding]", which means about all sorts of and at the same way puts the thing(s) talked about in an implied negative light. Here is an example:
Er brachte tausend und eine Ausrede vor.
That means he made many/all sorts of excuses and - this is implied - they all weren't that convincing. Also:
Er versuchte sich in tausend und einem Beruf.
He tried a lot (not literally 1001) of various professions (but - impliedly - wasn't all that successful in any of them).
I suppose the origin of this phrase is the collection of stories of Persian (maybe Arabian or even Indian) origin ("hazār-u yak šab"), which is in German known under various titles: "Tausend und eine Nacht", "Märchen aus den tausend Nächten und der einen Nacht", etc.. In English one common title is "One Thousand and One Night".
Basically, a girl (Scheherazade) is threatened by the King to be executed after having spent the night with him, so she tells him a story and ends it with some cliffhanger. The king wants to know how the story ends and spares her life, so the next day she finishes the story and starts a new one, again ending in a cliffhanger. So the king postpones her execution again and so on. After three years she has born him three children and he lifts the threat of execution.
*) Note that if one counts out, the "und" is usually not spoken:
eine Million eins