You can apply.
Submitting an inland application won't stop a removal, at least not in the early stages. So you can still be removed by CBSA. Once you have AIP (which happens late in the inland process), CBSA generally holds off on removals. But if you are only submitting the inland application now, you are still many months away from AIP.
If you are in fact removed, this will effectively cancel the inland application and you'll have to reapply outland.
Good luck.