Your proof is on the right lines, but you've stopped half way through. We can prove a similar proposition by using proof by contradiction.
Consider $p$, a positive, prime.
Let us assume that $\sqrt{p}$ is rational. If $n$ is rational then there exist natural number $a$ and $b$ with $b \neq 0$ such that $\sqrt{p} = a/b$. Moreover, without loss of generality we may assume that $a$ and $b$ have no common factor. (If they did have common factors then we could cancel them, e.g. $4/6$ would become $2/3$.) We shall show that this initial assumption leads to a contradiction.
If $\sqrt{p} = a/b$ then $p = a^2/b^2$ and so $a^2 = pb^2.$ Since $p$ is a factor of the right-hand side then $p$ must also be a factor of the left-hand side, i.e. a factor of $a^2$. If $p$ is a factor of $a^2$ then it must also be a factor of $a$. If $p$ is a factor of $a$ then, by definition, there exists an integer $k$ for which $a = pk$.
Using the fact that $a^2 = pb^2$ and $a = pk$ we see that $(pk)^2 = pb^2$. Expanding the left-hand side gives $p^2k^2=pb^2$. Dividing both sides by $p$ yields $pk^2 = b^2$. Clearly, $p$ divides the left-hand side, and so $p$ must also divide the right-hand side. If $p$ divides $b^2$ then $p$ must also divide $b$.
It follows that $p$ divides both $a$ and $b$, but this contradicts out previous assumption that $a$ and $b$ had no common factors. Thus, the must be a flaw in our argument. Every step, besides out original assumption, has been pure logic and could not possibly be incorrect. It follows that our mistake must have been our assumption that there exist $a$ and $b$ for which $\sqrt{p} = a/b$, i.e. that $\sqrt{p}$ is rational.
Since a number is either rational or irrational, it follows that $\sqrt{p}$ must be irrational.
Note: To complete your understanding, try following the same argument through with $n = 4$. You will find that you quickly become stuck.