I am treating this as a reference request. The first reference you want to consult is Euclid's Elements. If you can get Heath's translation, then it contains some excellent commentary, but there are good versions online too, e.g., a nice translation by R. Fitzpatrick.
Particularly important to dispel your misunderstandings are:
Book V, which expounds Eudoxus's theory of proportion. This begins with what is effectively a relative definition of the concept of magnitude: a magnitude is something like a length or an area that you can add, subtract and compare geometrically. Particularly important is definition V.5, which tells you how to compare two ratios between arbitrary magnitudes. Dedekind's approach to defining the real numbers is a direct descendant of this definition.
Book VII, which is about elementary number theory. It begins with a definition of number, i.e., positive integer. I don't believe that
numbers where intended to be thought of as magnitudes, but the theory
of proportions also applies to numbers and so numbers and magnitudes can be compared. Euclid has no notion of algebraic expression, but he can
say of magnitudes $x$ and $y$ that "$x$ is to $y$ as $1$ is to $2$", meaning $y = 2x$.
Book X, which is about incommensurable magnitudes, i.e., magnitudes $x$ and $y$ such that $x/y$ is irrational. It begins with a definition of Euclid's algorithm for arbitrary magnitudes. Theorem X.2 analyses the termination condition for this algorithm and concludes that it terminates on inputs $x$ and $y$ iff $x/y$ is rational.
You should then bear in mind that Euclid's Elements is not an enyclopaedic compendium of all ancient Greek mathematics. It was probably intended as something more like a graduate textbook. There are lots of good sources on the history of mathematics that you should look into if you are interested in the subject. The MacTutor page on Euclid could be a good place to start in this case.