This is a non-problem: if a candidate approaches you for Role A, and you decide they'd be a great fit for Role A+B, then create Role A+B, and perform the perfunctory interview, then hire them at the new role.
There is no (and I feel comfortable with this absolute) scenario where you need to keep the salary range hidden, or where a published salary range prevents you from hiring a candidate for an expanded role. None.
The only thing transparent pricing does is result in an informed participant in the market, which is pricing signals and thus something Capitalism.
Once you go down the route of asking for special exemption to make your business work in an open market, you're not doing Capitalism anymore.
This works for some orgs but not for ones where roles require significant negotiation and sign-off. That can take weeks or months and by that point an attractive candidate has moved on.
To be honest, the places I’ve worked for that could do this were not the best jobs I’ve had. That flexibility can sometimes point to other organizational issues.
It's a bureaucratic problem. Getting a headcount approved for a specific role is a non-issue. Getting HC approved for something brand new might be impressively complicated. Especially at large companies, listed postings persist for many months sometimes and stagnate because functions, dynamics or org alignment shifts before anyone is hired. It's much easier to write a generic-ish job posting and just coach the recruiter/screener on updated specifics than it is to retract a posting, rewrite it, and repost it. This happened to me frequently when I was a hiring manager at Google, for example.