Let $N = \ker A$. Choose a basis $e_n, ..., e_{r+1}$ of $N$, where $n-r = \dim N$. Take a completion of that basis to obtain a basis $e_1, ..., e_r, e_{r+1}, ..., e_n$ of $K^n$. Denote $M$ as the subspace spanned by the vectors $e_1, ..., e_r$.
We can then write $K^n = M\oplus N$. Suppose that $\text{rank}(A) = r = \dim M>n/2$, then $\dim N = n-r\leq \lfloor n/2\rfloor$. Then $Ae_1$, ..., $Ae_r$ all belong to $N$, but since there's $\geq\lceil n/2 \rceil$ amount of them (in case $n/2$ is an integer, we want to use the inequality $r>n/2$), some must be linearly dependent, say $Ae_r = a_1Ae_1+...+a_{r-1}Ae_{r-1} = A(a_1e_1+...+a_{r-1}e_{r-1})$. But $A$ is 1-1 on $M$, so we must have $e_r = a_1e_1+...+a_{r-1}e_{r-1}$, which is a contradiction with the fact that
$e_1, ..., e_r$ is a basis of $M$. Hence we must have $\dim M\leq n/2$.
$A$ is injective on $M$, because if it were $Ax = Ay$, then $A(x-y) = 0$ hence $x-y\in M\cap N = \{0\}$, so that $x = y$.