Who told you that? Those exercises have hardly any impact at all! "High impact" is stuff like running. I'm not an expert or a doctor but common sense discussion in these forums has indicated a pretty consistent opinion on this subject: staying fit and strong is good thing, both physically and emotionally!
Another important benefit: as a woman you know you need to take care of your bones. You are young so you still have a decade or so ahead of you to continue adding bone mass. Lower body strength training is a great way to increase the density of your big bones to help them see you through all the rest of your life. One effect of spondylitis can be a loss of bone density - I'm not sure they understand why - but there are folks here (male and female) who have had to deal with osteopenia much younger than if they had not had SpA. So lifting is good in general and for bone health, which is critical in spondies.
Unless you have specific damage/problems that make it a bad/risky idea to do this lower-body strength training I can't see why it is a problem assuming you have been using good form and are lifting safely. Doctors often cannot relate to people who are very active/athletic and unfortunately, it is easy for them to say to limit activity esp. when confronted with something that seems "strange" such as a 24 year old woman who does this sort of strength training.
Many who post in these forums exercise regularly, everything from weight training to running & cycling. One guy was in the Olympic trials for the marathon a couple of years back! Just use common sense in protecting your body to avoid injury - as you always have, I hope
Keeping your muscles strong will help provide support for problematic areas that are inflamed (joints and entheses.) I used to lift too (in my 30s) - at my peak I could squat more than my weight of 145. I gradually dropped my lifting and running (I had done many races including several half marathons) not due to health issues, just due to lifestyle priorities and feeling tired of it. I am starting to get my mojo back and just bought a new pair of running shoes yesterday - just the knowledge that I've got a plan to run our annual Thanksgiving Day 10k race has me all excited
On the "hip" pain - make sure it is thoroughly evaluated. It could be due to SpA but could also be a training injury. Problems in the hip area can feel to us like it is the hip joint but often it is not. If you can, get to see a good PT - one who focuses on rehabbing athletes after injury/surgery, ideally - to make sure you understand the specific issues going on in your body and what things may help or cause further damage/irritation. A way to find someone like that is through a sports medicine doc/practice (group practices may include ortho surgeons and physical med/rehab specialists, aka physiatrists - the latter is the doc you would want to consult for a thorough evaluation of the mechanical issues that may be going on as part of your SpA, or in addition to it.
Welcome to the forums - glad you are found us but please know this is not a death sentence. Keep on truckin'!