Your teacher is explaining it to you in the language you will understand. The entire theory of practice of Yoga is based on Samkhya and Patanjali’s Yogasutras. All of the later Yogic texts are expansions on the basic framework laid down by Kapila and Patanjali(founders and codifiers of Samkhya and Yoga respectively) Even the Hatha Yoga Pradipika is a supplemenary text.
You need to read the Samkhyakarika for a start(the branches of avidya are mentioned within them by the way with even more further classification)
The superficial understanding is indeed that the ego is the block of self-realization but you need to understand what the ego is in Samkhya-Yoga philosophy.
Let’s begin from the start:
In the beginning all of prakriti(nature/matter) is in an absolute state of potential and consists of three modalities called the three gunas: expansion, contraction and stillness. These are in absolute equlibrium and thus prakriti is a complete state of dormancy. This state of Prakriti is known as moolaprakriti(quantum or root matter) This is then an event called spandana when the Purusha(witness, observer, self) simply observes prakriti and this creates a massive vibration which shakes up the gunas at a very sudden and rapid rate(this initial vibration is known pranava or the sound of OM) the very first guna that dominates is rajas(expansion) and there is a very sudden expansion of matter and then both sattva and tamas(stilness and contraction) begin to dominate over rajas and as a result the rate of expansion is dampened and the expansion of the universe(bramananda) slows down, eventually tamas(contraction) will dominate and and the universe will contract and go back to the state of moolaprakriti.
Do you follow so far? The initial displacement of prakriti caused by the observation by purusha causes the gunas to oscillate at a rapid frequency and modulate in various ways. These modulations then go onto produce various evolutes and first evolute is not any kind of physical matter at all it is mahat or buddhi or pure intelligence(cosmic intelligence) and it made of the impulses of prana of which there are 5 types: prana, apana, vyana, udana, and samana. This pure intelligence then instantly divided into infinite units or buddhis called ahamkaras(constructed egos made out of pranic impulses)(jivatmans) which are living sparks. The very act of this division causes the entire field of prakriti to be artifically split into two divisions subjective and objective(there was no spilt prior to this) because of the living sparks are referencing it. This leads to the development of manas(mind), jnanaindriyas(sense organs) and karmaindras(motor organs) on the subjective side(false subjectivity) and tanmatras(sensory elements) and mahabhuttas(5 physical elements) on the objective side(false objectivity).
So the superficial understanding is it is the ahamkara(false ego) that is the central block to self realization. However, the ahamkara itself is made up pranic impulse(the intelligence) and this in turn as just vibrational modulations of the gunas at the very core of quantum or root matter. This is the detailed understanding.
This is why Patanjali does not define Yoga as the dissolution of the ego but rather the dissolution of the vritti activity which he explains to be the gunas modulations within the consciousness field.
Your Hindu guru will be able to explain this to you if you ask him for the proper detailed explanation. Many Hindus gurus do not want to confuse their Western students with the highly technical Sanskrit descriptions so they give them something they can understand. Unfortunately, invariably, this leads to misunderstanding.
You will never lose your self I can gaurantee that now. However what you will lose are the limitations that your is self identified with at his moment. When you lose those limitations you will have a completely free and infinitely expanded self.