According to the ansible-core support matrix: Yes for the target, but you’ll need Python 3.12 - 3.14 on the control node (your Debian container).
BTW ansible-core 2.21.0b2 has been released recently. You can use it to test if 2.21 will (presumably) work for you.
Make sure and check the Ansible Core Porting Guides, there have been quite some changes since 2.16. IIRC especially 2.19 introduced a lot.