Gauss-Jordan Elimination (See http://mathworld.wolfram.com/Gauss-JordanElimination.html) might do the trick. This isn't a trivial implementation but I'm sure with some effort you could get it to work. Note the following is a very informal sketch of the algorithm:
Start with [A I]
[a11 a12 a13 : 1 0 0]
[a21 a22 a23 : 0 1 0]
[a31 a32 a33 : 0 0 1]
Add a21/a11 * row1 to row2
[a11 a12 a13 : 1 0 0]
[ 0 XXX YYY : r s t]
[a31 a32 a33 : 0 0 1]
- Do the same thing to row three (ie. add a31/a11 * row1 to row3)
After the previous steps you will have zeros in the first column expect for you leading a11.
Now, add a22/a32 * row2 to row3. This will change a32 to a zero. Repeat on all FOLLOWING rows.
repeat previous step on all LARGER columns.
You will have to generalize this method to operate on matricies larger than 3x3 but the pattern should be simple. When you have finished steps 1-5, you will be left with an upper triangular matrix. Now, you start going backwards. You add a portion of row 3 to rows 1 and 2 to change their third columns to zero, then a portion of row 2 to row 1 to change row 1's column to a zero (once again, generalize this to work on X by X matricies.
When that is finished, you will be left with a diagonal matrix on the left. Multiply each row by a factor that will change it to the identity matrix.
The result on the right is your inverted matrix! You will have to find ways of incorporating acceptable error into this.