Hello,
You can use life cycle for such purpose.
Yes, it is possible to restrict debug access via password protection when HSE is not installed.
Your need to program field CUST_DB_PSWD_A in UTEST memory with the desired password and then advance the lifecycle.
Best regards,
Peter