It's usually a state regulated thing, though I know Missouri does it by county, while Nevada does it by city. Unfortunately, it also means defining what is a 'license,' and what it means to 'carry one.' The exact nature of your job also matters.
For example .... one industrial establishment near me suddenly 'discovered' that the local laws required every person on an electrical contractors' crew to have a license- be it as a master, journeyman, or apprentice. The several contractors were all found to have several crew members who did not have the local license. (This isn't as bad as it might sound; the place is right where five states meet).
The company was set to have all manner of fun with the contractors ... until it was pointed out that the same law required their own plant maintenance people to carry 'industrial electrician' licenses. Nevermind
As for 'carrying' one .... it might be enough to simply have submitted your paperwork, or to have been issued the appropriate license. The situation can, however, change. I actually had an inspector ask to see mine (he was certain he had caught a scoflaw, and was stunned when I produced one).
A related issue arises on union jobs. In those, it's common for a union representative to ask to see your union card. Such a document would usually be in addition to any required license.
Can having a license in a neighboring area meet the requirement? That depends on who's asking, and what the local rules are. Even without having the local 'paper,' being able to produce something is often a real help, assuring the others that they're dealing with a professional.