By using an invariant we show in an original and quite unexpected way that a one-parameter class of nonlinear second-order difference equations is solvable in closed form, improving and theoretically explaining a recent result in the literature. As a motivation for this and also for general use of invariants for difference equations in solvability, we also demonstrate an application of the method of invariants on a very basic example of linear first-order difference equation with constant coefficients explaining a frequently confused detail. We also give a general hint how the method can be applied for the case of difference equations of any order.