Yes, your understanding is correct. You can use the basic transmit mailbox to dynamically change the TX ID in run time.
Please use PSoC Creator to view the Code example for the same.
Open PSoC Creator. File -> Code Example. Choose 4200 M in the device family.
CAN_Full_P4_Example has Basic Transmit Mailbox and Full Receive mailbox
CAN_Basic_P4_Example has Full Transmit Mailbox and Basic Receive mailbox
Hope this helps!
Thank you for your reply!
It was very helpful for me!