Usually the proof of $\sqrt2$ is irrational is done by contradiction(e.g. here), but I found another similar but short proof in the book "Beginning Algebra for College Students" by Lloyd Lincoln Lowenstein.
The proof goes like this:
Suppose then that $x^2=2$ and $x=a/b$, where $a$ and $b$ are integers. Then $$\left(\dfrac ab\right)^2=2\ \ \text{or}\ \ \dfrac {a^2}{b^2}=2;$$ and $$a^2=2b^2$$ Consider the number $b^2$. If it has the factor 2, it has the factor $2$ an even number of times and $2b^2$ has the factor $2$ an odd number of times. But this says that $a^2$, the square of an integer, has the factor $2$ an odd number of times, which is impossible. We see that $\left(a/b\right)^2=2$, must be a true statement . But we know that the second statement is false, and therefore the first must be false and there is no pair of integers $a$ and $b$ such that $\left( a/b\right)^2$; or the number whose square is $2$ cannot be a rational number.
The sole idea is that the quantity on the right hand side, namely $2b^2$ does contain the factor $2$ an odd number of times and the quantity on the left hand side, namely $a^2$ will always contain $2$ an even number of times.
$a$ and $b$ are not presumed to be coprime as opposed to the case in the usual proof(e.g. here on wikipedea), nor does it use the Euclid's lemma.
The problem is that I am not able to find this proof on internet. So,
What is the name of this proof and where can I find about it in more detail? Who discovered it and how, etc
P.S: I've found the same proof and a short discussion(in the comments) in this post. It seems like that the the history of the proof is not clear, nonetheless I would like to know about it as much as it is available.
P.P.S: I've found another similar prove here on wikipedea. It is based on the fact that if $\dfrac ab$ is in its lowest terms then at least one of $a$ and $b$ should be odd. We then show that both $a$ and $b$ are even-- a contradiction.