The character banging on the monastry door is Shadowheart. Which you can actually avoid to rescue. Or, if you roll poorly (natural 1) and I think you can retry with Lae'zel but she can roll poorly as well (another natural 1), you can altogether miss out on her.
You cannot actually avoid Lae'zel. I mean you could avoid to rescue her from the trap after the Nautiloid. I never tried out what happends if you do so.
You could also throw her out of the party after she joined and the combat that follows. I dont think there is any possibility to avoid having a party with her when she ambushes you though.
I have the answer to that!
Eventually she'll get free, as when you walk by, the cage is destroyed and the two tieflings are dead.
However, referring to the yellow above, if she hasn't joined you, and you run up to the Githyanki at the broken bridge, Lae'zel shows up out of nowhere and insinuates herself into the conversation. She then joins them in the fight against you. So, not good unless you're fine with that.