Context. Cosmic opacity for very high energy γ rays (E > 10 TeV) that result from the interaction with the extragalactic background light can be strongly reduced. This is because of possible Lorentz-violating terms in the dispersion relations for particles expected for several versions of quantum gravity theories. Aims. We discuss the possibility of using very high-energy observations of blazars to detect anomalies in the cosmic opacity that are induced by Lorentz invariance violation (LIV), taking the possibility of using extreme BL Lacertae (BL Lac) objects into particular consideration, as well as the bright and nearby BL Lac Mkn 501. Methods. We derive the modified expression for the optical depth of γ rays by also taking redshift dependence into consideration and, by applying this, we derive the expected high-energy spectrum above 10 TeV of Mkn 501, in high and low states, and of the extreme BL Lac 1ES 0229+200. Results. Along with the nearby and well studied BL Lac Mkn 501 especially in high state, other suitable targets are extreme BL Lac objects, characterized by quite hard TeV intrinsic spectra which probably extend at the energies relevant when detecting LIV features.