That depends on how you define a straight line. More generally, it depends on what geometry you are using.
Some presentations of what we call Euclidean Geometry do so by effectively defining lines to be images of 1-1 functions from the real numbers, so in that case the answer is, almost trivially, Yes.
On the other hand, I think the original Euclidean geometry, using Euclid's original postulates, only allows construction of items that can be drawn on paper with a straightedge (ruler), pencil and collapsing compass (it collapses when you take either the pencil or the point off the paper). Many constructions cannot be done in such a geometry, such as trisecting an arbitrary angle. While we can construct line segments with square roots as lengths, and maybe even all algebraic numbers, I expect most transcendental numbers are impossible to construct. So we would be unable to establish a 1-1 correspondence between the real numbers and the points on a line in the original Euclidean geometry, because the latter provides no way to identify points whose distance from a given point on the line is a transcendental number.