Step 1 :First, we set up the augmented matrix for the system. This is done by writing the matrix $M$ and the $3 \times 3$ identity matrix $I$ side by side: $\left(\begin{array}{ccc|ccc}1 & 0 & 1 & 1 & 0 & 0 \\ 2 & 1 & 2 & 0 & 1 & 0 \\ 1 & 0 & 2 & 0 & 0 & 1\end{array}\right)$
Step 2 :Next, we perform row operations to transform the left side of the augmented matrix into the identity matrix. The first step is to subtract twice the first row from the second row, and subtract the first row from the third row. This gives us: $\left(\begin{array}{ccc|ccc}1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & 0 & -2 & 1 & 0 \\ 0 & 0 & 1 & -1 & 0 & 1\end{array}\right)$
Step 3 :Then, we subtract the first row from the third row to get: $\left(\begin{array}{ccc|ccc}1 & 0 & 0 & 2 & 0 & -1 \\ 0 & 1 & 0 & -2 & 1 & 0 \\ 0 & 0 & 1 & -1 & 0 & 1\end{array}\right)$
Step 4 :Finally, we subtract the third row from the first row to get: $\left(\begin{array}{ccc|ccc}1 & 0 & 0 & 3 & 0 & -2 \\ 0 & 1 & 0 & -2 & 1 & 0 \\ 0 & 0 & 1 & -1 & 0 & 1\end{array}\right)$
Step 5 :Now, the left side of the augmented matrix is the identity matrix, so the right side of the augmented matrix is the inverse of $M$. Therefore, $M^{-1} = \boxed{\left(\begin{array}{ccc}3 & 0 & -2 \\ -2 & 1 & 0 \\ -1 & 0 & 1\end{array}\right)}$