There is such a thing as a generalized inverse, in which you can invert non-square or non-full rank matrices and the generalized inverse meets many (but not all) of the properties of an inverse. The tough part is that the agreed upon set of properties does not create a unique solution for a generalized inverse like it does for the inverse, so there are multiple possibilities when someone says generalized inverse. However, the most popular is probably the Moore-Penrose inverse: https://en.wikipedia.org/wiki/Moore–Penrose_inverse