A player is eligible for the federation specified on their FIDE profile.
This is usually the player's home country but it is possilble to change federations if both agree and the receiving federation pays a transfer fee to FIDE.