Let $A\in M(m\times n,\mathbb{K})$ be a matrix given in the row echelon form with rank $r$. Let $e_i$ be the $i$-th unit vector of $\mathbb{K}^m$. Show that $(e_1,\dots, e_r)$ is a base of $\operatorname{im}(A) \subseteq \mathbb{K}^m$
In my opinion, $A$ should look like
$$ \begin{pmatrix} a_{11} & \\ 0 & a_{22} & &*\\ \vdots & \ddots & \ddots \\ 0 & \dots & 0 & a_{rr} \end{pmatrix}$$ with $*$ I indicate arbitrarily coefficients of $A$. Because we don't change the matrix by multiplying the inverse elements to every $a_{ij}$, we obtain
$$ \begin{pmatrix} 1 & \\ 0 & 1 & &*\\ \vdots & \ddots & \ddots \\ 0 & \dots & 0 & 1 \end{pmatrix} $$ which actually are all $r$ unit vectors $(e_1,\dots,e_r)$
Since $\operatorname{im(A)}:=\operatorname{span}\{(a_{11},\dots,a_{m1}),\dots,(a_{n1},\dots,a_{mn})\}$ is the span of all column vectors of the initial matrix, we found a basis for $\operatorname{im}(A)\quad _\blacksquare$
Is this proof ok?
The matrix is an $m\times n$ matrix mapping from $\Bbb K^n\to \Bbb K^m$, it's not an $r\times r$ matrix, it just has rank $r$, so your $A$ isn't quite right (unless $r=n=m$). I'm not entirely sure what you mean by multiplying by the inverse entries of the $a_{ij}$, do you mean to multiply by the diagonal matrix $\text{diag}(a_{11},a_{22},\dots,a_{rr})$?
If you put the rank $r$ matrix $A$ in row echelon form, then with the ordered basis $(e_1,\dots,e_m)$ on $\Bbb K^m$, the image of $A$ will lie in the span of the first $r$ standard basis vectors (small example so it's easy to typeset): $$\begin{bmatrix}a&b&c&d&e\\0&f&g&h&i\\0&0&j&k&l\\0&0&0&0&0\\0&0&0&0&0\\0&0&0&0&0\end{bmatrix}.$$ (Assume the first three rows are linearly independent) This is a linear map from $\Bbb K^5\to\Bbb K^6$ and it sends $$\begin{align}e_1&\mapsto ae_1,\\e_2&\mapsto be_1+fe_2,\\e_3&\mapsto ce_1+ge_2+je_3,\\e_4&\mapsto0\end{align}$$ and so on. You can see each element of the image is written in terms of the first $r$ standard basis vectors of $\Bbb K^m$. You can lift this to the general case easily.