There are many paradoxes in yoga and in spiritual life. One of them is that whilst the main aim of yoga is to see beyond the ego, all practice starts with the ego. All yogic practice, no matter how subtle, is done by the ego. After all, it is our sense of individuality that practices, generally to achieve or attain something - otherwise why would we practice?
How can working with the limited ego help us reach that which lies beyond the ego?
There are various answers, but the main ingredient is the attitude of non-expectation. By doing practice for its own sake, without expectation, one opens up to the non-ego realms.
If we expect, then immediately we are defining possible experience within the framework of the ego and its projections. Therefore, as much as is possible, we should have an attitude of child-like simplicity where we are open to the unknown. Ideally we should practice yoga just for the sake of doing the practice. Then, and only then, can yoga help to reveal the hidden treasures which lie within each of us ... but beyond the confinements of the ego.