In the U.S. as long as you meet that particular state's/county's residency requirement (many states require that you have been a resident of the state/county for a certain length of time - I think a few don't have any length requirement as long as you are a bona fide resident, while for example Michigan has a one-year residency requirement) anyone, citizen or not, can file for a name change (I'm not sure about illegals though, but I do know that applies to anyone who is authorized to legally live here). The challenge, of course, is finding a visa you could immigrate on.