Provided that the referee has started their pre-match inspection, they have the power to take disciplinary action against players who commit sending-off offences. Law 12 - Fouls and Misconduct, Section 3 - Disciplinary Action:
The referee has the authority to take disciplinary action from entering the field of play for the pre-match inspection until leaving the field of play after the match ends (including kicks from the penalty mark).
If, before entering the field of play at the start of the match, a player commits a sending-off offence, the referee has the authority to prevent the player taking part in the match (see Law 3.6); the referee will report any other misconduct.
The described scenario is explicitly mentioned in the Laws of the Game - Law 3: The Players - 6. Players and Substitutes Sent Off:
A player who is sent off:
- before submission of the team list can not be named on the team list in any capacity
- after being named on the team list and before kick-off may be replaced by a named substitute, who can not be replaced; the number of substitutions the team can make is not reduced
A named substitute who is sent off before or after the kick-off may not be replaced.
So, if a player in the starting 11 is sent off before the game starts, he can be substituted and the number of substitutions is not changed - although there will be one less substitute available in the technical area, as the substitute may not be replaced.
If the team list has not yet been submitted to the referee, they may not be added to the list - either as a player or substitute, so the team will have a full complement of players and substitutes (they will replace a player with a substitute on the team list, and a substitute with a reserve - provided they have one available).
Prior to 2016, the team list issue was a moot point, as the referee only had the power to sanction players after entering the field at the start of the game, which is after the team list is submitted.