I agree with everything
@MicroDrie wrote, I'll just add my perspective also.
I was wondering if it was possible to develop an app that would listen for loud noises and/or frequencies
Yes, of course it is possible to do that.
automatically trigger noise cancelation headphones
This isn't very specific, but for the simplest form of "triggering", I would say that you could do one level simpler than what MicroDrie suggested, by simply
turn on the headphones. So, no changing settings or anything, just some sort of electrical connection happening so they turn on.
if someone with Autism struggled with certain noises
Now you are adding complexity by differentiating between noises. It's one thing to trigger by amplitude or frequency, it's more complex to trigger by a loud bang but not a loud moo from a cow you're standing next to.
cancel out the noise the person would have discomfort or sensory issues with
It is my amateur understanding that noise cancelling is somewhat simple in theory but somewhat complex in practice. I would recommend using a previously created solution instead of trying to roll your own.
if it is possible how complex would the app be?
Assuming it's based on amplitude and frequency, I think you would be able to find a fair amount of example code in the forum to help you. As for recognizing sounds in near realtime, I'd say it's probably a lot more complex.
Also, you've posted this in the Android forum, but that might not make the most sense for the project. It might make more sense to base it on some sort of small computer, such as Raspberry Zero, with a small battery pack connected, and connections to the always-worn-but-not-always-on headphones.
A final note. As a dissertation this project might be just fine. But if we're talking something that should work in reality, I'd say that it's probably a superior solution to just constantly wear a couple of always-on noise cancelling headphones.
Just my thoughts on the subject, best of luck to you.