Yes it is possible. First you need to check with your provider what caller ID format they are expecting.
The behavior you mentioned indicates that your provider doesn't like the caller ID format sent to them and they override it with the pilot number of the trunk.
Once you get that, you can create voice translation rules to format the caller ID as below (this example for 4-digits extensions starting with 3).
voice translation-rule 1
rule 1 /^\(3...\$)/ /xxxx\1/ type any unk plan any unk
!
voice translation-pro xforming
translate calling 1
!
dial-peer voip x pots/voip
translation-profile outgoing xforming