You no longer need to be in a rested area to change talents in Dragonflight. The only requirement is being out of combat.
Blizzard made some changes to how talents and loadouts work in the latest Alpha update. We went to check it out in-game. Changing your specialization incurs a cast of around 5 seconds, the same as on live servers, but you can now change your spec anywhere in the open world.
Changing loadouts (pre-saved talent builds) also has a short cast time, most likely to prevent players from switching between builds too fast.