To play for a country you must have at least one grandparent from that country, and once you play for a country once that is the only country you can play for.
Yes, you must have valid citizenship of a country to represent them in any major sporting event. A team can have a foreign manager but it cannot have foreign players.
Jefferson played for Brazil in the 2014 FIFA World Cup.
Fernandinho played for Brazil in the 2014 FIFA World Cup.
Paulinho played for Brazil in the 2014 FIFA World Cup.
Fred played for Brazil in the 2014 FIFA World Cup.
Neymar played for Brazil in the 2014 FIFA World Cup.
Dante played for Brazil in the 2014 FIFA World Cup.
Maxwell played for Brazil in the 2014 FIFA World Cup.
Henrique played for Brazil in the 2014 FIFA World Cup.
Ramires played for Brazil in the 2014 FIFA World Cup.
Hernanes played for Brazil in the 2014 FIFA World Cup.
Willian played for Brazil in the 2014 FIFA World Cup.
Bernard played for Brazil in the 2014 FIFA World Cup.