Two-dimensional electron gas as a detector of the magnetic properties of single-crystal high-Tcsuperconductors: application to the case of YBa2Cu3O7- delta