The IBEX ribbon as a signature of the inhomogeneity of the local interstellar medium