Can you? Most likely. Should you? You’ll need to reprove more than a handful of theorems, and for what? What advantage does using rationals instead of reals get you?
You might enjoy taking courses in real & complex analysis, the general purpose of which is to impart upon the receiver an understanding of why we’ve constructed those particular number systems and how despite the names they both describe things which are perfectly real in the philosophical sense.
Edit: recall that the rationals are simply defined as the set of numbers which can be represented in the form a/b where a is an integer and b is a nonzero integer. This isn’t some deep philosophical tie to an underlying reality, it’s just our first attempt at defining more useful numbers that lie between other useful numbers we already invented (the integers et al). The real and complex numbers are literally just the extension of that process, filling in holes between useful numbers with more numbers until the set is closed (i.e. there are no more holes, every operation between members of the set results in another member of the set). Closure, the real reason we care so much about the reals, is just a surprise tool that helps us later. For anyone who made it this far: if you find any of this interesting you should find a book or lecture on analysis. It’s not particularly difficult and presents deeper insights into the math you likely already learned.