If your matrix $A$ has its first two columns independent, and the third column dependent on the first two columns (so $A$ has rank 2), then you can work with the transpose $A^t$ which will then have its last row dependent on its first two rows, where the first two rows are independent. Row reduction will then put $A^t$ into the shape
$$C=\pmatrix{1&0&x\\0&1&y\\0&0&0}$$
and to get the matrix $Q$ which when multiplying $A^t$ on the left gives $C$ one technique is to start with a 3 by 6 matrix consisting of $A^t$ followed by a 3 by 3 identity matrix. Then after row reduction (only carried out on the left 3 by 3 part, viewing the 3 by 3 section after that as "right hand sides") the desired matrix $Q$ will be located where the identity matrix was initially. Then go by transpose again and your original matrix $A$ should be postmultiplied by the transposed matrix $Q^t.$
Example: Original matrix
$$A=\pmatrix{1&2&3\\2&3&5\\3&4&7}.$$
Taking transpose and inserting 3 by 3 identity afterwards gives
$$\pmatrix{1&2&3&1&0&0\\2&3&4&0&1&0\\3&5&7&0&0&1}.$$
Row reduction of this (only on the left 3 by 3 part) gives
$$\pmatrix{1&0&-1&-3&2&0\\0&1&2&2&-1&0\\0&0&0&1&1&-1}.$$
Then $Q$ is read off as the second 3 by 3 part of this, namely
$$Q=\pmatrix{-3&2&0\\2&-1&0\\1&1&-1}.$$ Then $QA^t$ is equal to the left 3 by 3 matrix of the reduced matrix above, namely
$$QA^t=\pmatrix{1&0&-1\\0&1&2\\0&0&0}.$$
Finally one takes transposes to get $AQ^t$ as the matrix you seek, in this case
$$C=\pmatrix{1&0&0\\0&1&0\\-1&2&0}.$$
In general for the rank 2 situation you describe, with the first two columns independent, the final matrix $c$ obtained this way will have $1$ on the first two diagonal elements (so nonzero as you request) and also necessarily a $0$ in the lower right diagonal place. There are also zeros in positions $(1,2),(2,1),(1,3),(2,3)$ if one has gone to complete row reduction at the corresponding stage of row reducing the transpose of $A$.