Your book's claim is correct, and both of the definitions you quote are equivalent.
We normally fix the zero level of energy by specifying that, at zero energy, the electron is no longer bound to the nucleus, and it is therefore free to escape - but it has zero remaining kinetic energy when it (asymptotically) reaches infinity; in the Kepler problem, this corresponds to a parabolic orbit. Electrons in such a state are definitely unbound, and if you add a static extraction field (as in photoelectric-effect experiments) then that field will take the electron away.
The core role of the ionization energy is as a threshold. It is defined as the difference between the ground-state energy and the zero-energy level, and thus
- if you supply more energy than that, then the electron will be released and it will reach infinity with kinetic energy to spare, while
- if you supply less energy than that, then the electron might reach some high-lying Rydberg state, but it will remain bound to the nucleus.
To that, your natural next question is almost certainly "and what if you supply the electron with exactly the ionization energy?", to which the answer is: you can't.
- For one thing, there's no such thing as "exactly" in physics, and all measurements and quantities are always a bit "thick". In this case, it means that you'll be depositing energy to either side of the ionization threshold, i.e. you'll be putting some population in high-lying bound Rydberg states, and some population in low-but-positive-energy unbound continuum states.
- In the more specific case of transitions in quantum mechanics, attempting to deliver exactly the ionization energy means that you're attempting a process with $\Delta E=0$, and by the Heisenberg Uncertainty Principle this means that the process must take $\Delta t=\infty$, i.e. it is impossible to achieve an infinitely narrow bandwidth in a finite amount of time.
That said, mathematically speaking, there is a state at zero energy, described in more detail in this MathOverflow thread - but really, I would leave the question of what happens there until you've had a proper go at the full mathematical toolkit of quantum mechanics.
As to why your book has drawn it as a dashed line - it's because the ionization threshold acts as an accumulation point for the Rydberg-state energies, which 'bunch up' as $n$ increases. Instead of drawing all of them (which is just not possible) we often draw their limit point as the dashed line in your book. How you went from a dashed line to "that level is imaginary" is a bit beyond me, though.