Integrable matrix equations related to pairs of compatible associative algebras