Please don't totally give up yoga because a clearly inadequate practitioner told you so.
what does he know about yoga? He may have an image of the extreme forms of yoga or the sort of yoga you'd find in a class with lots of young people in,
Yes give up yoga exercises that are weight bearing on that area or strain it, but there is a lot you can do on your back lying down or seated that keep other parts of your body as mobile and flexible as possible and the muscles strong, for example in your upper body, neck, head, hands, arms.
I'm a yoga teacher and have done yoga 50 years next spring and have used it to heal quite serious injuries as I have one leg shorter than the other leading to long term back, knee and ankle problems. Yoga has multiple benefits.
It depends how long you have done yoga whether you can go it alone or need an experienced teacher, but you can't go wrong really if you stick to chair yoga and avoid any parts of it that would strain your groin area.