Def: A generator matrix $G$ with entries in $\mathbb{F}_q$ generates code $C$, and each rows of $G$ is basis of $C$.
Does generator matrix of a code $C$ must have linearly independent rows?
For example, let $G_{ex}=\begin{pmatrix} 1 & 2 & 1\\ 2 & 1 & 2 \end{pmatrix}\in\mathbb{F}_3$, I am not sure this $G$ can be a valid generator matrix or not. Most generator matrix in the textbook are in systematic form,, but if a $G$ not in systematic form, we can use row reduction to make $G$ in systematic form. At this point, I can $rref(G_{ex})$ into systematic form. I think this is a true statement. If my explanation isn't correct, can someone explain to me? Thanks.
A generator matrix doesn't have to have linearly independent rows, but linear independence of rows is generally a good property to have. If the rows are linearly dependent, then two or more different data vectors will be mapped onto the same code vector, and thus, even in the absence of any channel errors, the decoder will not be able to determine which data vector was transmitted.
In the example that you have constructed, data vectors $00, 11, 22$ all are mapped onto the same code vector $000$.