Restricting access by DB number is indeed not possible with ACL. Options are:
Here is a great explanation of why Redis doesn't support restriction by DB number and why using DB numbers in production is highly discouraged: https://github.com/redis/redis/issues/8099#issuecomment-741868975