There are USB-C controllers which support mode change via internal registers but I wouldn’t say that means you can influence which one will end up configured as which during the initial connection. That part remains valid as described in my first reply. But I would say that after the initial negotiation you can change the role if your controller supports the feature.
I would suggest you read the datasheet and eval board description for something like the STUSB1600 or any other similar controller. It will give you great insight into how these things work.