The details of this depend a bit on how you imagine that input number to the algorithm is to be given -- there's no way to represent every real number as a finite combination of symbols that the algorithm can even inspect in a finite time.
However, it seems to be reasonable that if an algorithm such as the one you imagine exists at all, it ought to be able to formulate it such that it accepts input numbers given in the most explicit way imaginable:
Input: A computer program (or description of a Turing machine) that given $n$ produces the $n$th decimal digit of the real number we think about.
Output: "Yes" if the number we think about is rational, "No" otherwise.
One can prove that no algorithm with this input and output can exist. Namely, if it existed we could use it to decide the halting problem, which is known to be undecidable algorithmically.
Suppose we want to know whether Turing machine $T$ halts. We can then consider the real number $x$ whose digit number $n$ is
- $0$ is $T$ runs for at least $n$ steps,
- $1$ if $T$ halts in less than $n$ steps and $n$ is a perfect square, or
- $2$ if $T$ halts in less than $n$ steps and $n$ is not a perfect square
It is clear that this is a computable specification of the digits of $x$ -- for each digit we simply simulate $T$ for $n$ steps and see what happens.
Now if $T$ doesn't halt, $x$ will be $0$ -- in particular $x$ is rational. On the other hand, if $T$ does halt, $x$ will consist of a number of $0$s followed by an infinite sequence of $1$s and $2$s which never repeats (because the number of non-squares between successive squares increase monotonically). This, if $T$ halts, $x$ will be irrational.
If your algorithm existed, running it on this $x$ would tell us whether $T$ halts or not. But that is known to be impossible, so the algorithm cannot exist.
We might try to salvage this by requiring that the digits of $x$ must be given in some nicer way than by an unrestricted program that computes its digits. However, that doesn't lead us anywhere nice, because the digits of the number above are defined by a primitive recursive function, which is just about the simplest class of functions that one can argue are expressive enough to compute digits of most "interesting" real numbers, at least unless we cheat and introduce particular notations for "the digits of $e$", "the digits of $\pi$" and so forth for some hand-selected set of interesting constants.