Thinking about it, yeah. Minorly complicated, but here goes:
"Change dialplan parameters" Make sure match ext before UDP.
Change uniform-dial-plan. Make, for your example, 7, length 4 go aar.
That means the 7000's will go to AAR. In AAR analysis, 7000s match a SIP trunk to CUCM.
So, when 7640 is dialed, its matched against extensions first, and if so, ring the extension. When you dial 7468, it looks against extensions first, and if none, go to UDP, which routes 7000s to AAR, and away you go.
That said, there are very possibly/likely other considerations depending on how your system is set up, and changing "dialplan parameters" and making the change I suggested could impact other things - such as: sloppy admin. Rerouting extensions through UDP without removing those extensions. If you have "pick UDP first" for 1234 to go out your SIP trunk, and 1234 remained an extension, your change would kill calls to 1234 as the system would see it as an extension and not try UDP anymore. Hope that makes some sense.