A lot of numbers are called "constructible", in that, if $n$ is constructible, then we can find a construction in which a line of $n$ units can be made. Granted, this is not a trivial task depending on the construction and number involved.
In the sense of construction and only drawing a line, then the only thing we can draw "exactly" is a line segment which we would denote as our unit, essentially $1$. Everything else requires some method of construction. We can make $2$ by appending two unit lengths; we can make $1/2$ by bisecting a unit length.
The only things we're given is a unit length, our straightedge, and a compass. Nothing else; take out the construction and we only have a unit. (And you could even argue drawing the line itself is a unit.) From there, we can find constructible numbers $n$, which are $n$ unit lengths long.
It will also be helpful to note that we cannot use rulers. I mean, they can be used, insofar as being a straightedge, but we're not allowed to use them to measure out, say, $2$ inches or whatever. This is because the ruler might be flawed, your line might be flawed - it could be too long by ever-so-many atom-widths if you want to be pedantic; what temperature it is could affect the scaling even if only minutely; blah blah blah. In constructions, we effectively view the tools and our execution of the construction as "perfect", free of human errors like these, if just in the theoretical sense.
Why am I rambling on about constructions?
Because that is at the core of why you might say you cannot draw a line of length $\sqrt2$ units - because I think you're looking at the ruler. You look at it and go "I can't get to it because it's irrational. I can only guessimate in halves or quarters or whatever's on my ruler, I can only make rational estimations. I cannot find square root of $2$ just by drawing a line."
And you're right - you can't make $\sqrt2$ just by drawing a line. You can't make anything by drawing a line, except your unit, assuming - again - the inherent perfectness of construction and technique and not knowing exact lengths a priori.
The only length you can draw, without other aides, is a line $1$ unit long.
Seems weird when you say it but that's what it comes down to.
So how do we draw others? We use constructions. We make use of geometric principles to demonstrate other numbers are "constructible." These numbers can be constructed, made. Given a unit, straightedge, and compass, we can make a line $n$ units long, where $n$ is constructible.
This gives rise to the constructible numbers. Like the real numbers, they form a field: you can multiply and add any two constructible numbers to get another one. You can also divide and subtract them.
What are some examples of constructible numbers? Well...
- All of the natural numbers (just keep appending lines of length $1$ to each)
- All of the rational numbers (bisections and appending of various lengths)
- Square roots of rational numbers (the isosceles right triangle of side length $a$ suffices to give a hypotenuse of length $\sqrt a$)
These are not the only examples; the article I linked discusses them at further length. There are some numbers known to not be constructible:
- $\sqrt \pi$
- $\cos \left( \arccos(x)/3 \right)$ for constructible $x$ (related to how angles generally cannot be trisected)
I think that's enough rambling. In short:
- In reality, with only a straightedge, you are given a unit length, representative of $1$
- With compass and straightedge, you can make the constructible numbers (again, see https://en.wikipedia.org/wiki/Constructible_number for more info)
- Constructions cannot use rulers to measure out lengths: we can only have a straightedge and compass, and the former allows us a starting, unit length.
- In constructions, at least analyzing them in theoretical realm (rather than making practical use of them), we look at them in the sense of being "perfect" and absent of human errors. There are definitely rational approximations for $\pi$ or $\sqrt 2$ that are really, REALLY good (look into continued fractions if you're curious), and it shouldn't be hard to convince yourself of our ability to draw those. But constructions - if perfect, if idealized, if absent of error - also allows us to represent irrational numbers.
- We can draw right triangles via a construction and isosceles right triangles in particular - this isn't at all difficult - so we can draw lines of $\sqrt q$ for any rational $q$ units. This includes $q=2$. Of course, if you do it in real life, then it's not going to be exactly right, no measurement is. But in looking at constructions and constructible numbers, we ignore that and look at a theoretical, perfect, idealized case where these human errors aren't present. In that sense, $\sqrt 2$ is absolutely drawable (when you use a construction to get a right triangle). Of course in real life imperfections arise everywhere - but mathematics is kinda beautiful in that sense, it allows us to consider the idealized situation too, as well as make it practical, give us "close enough" solutions to real life.