The referee is only permitted to stop play for an injury if it is deemed serious. Head injuries, suspected fractures, loss of consciousness, open wounds and heavy collisions would usually be deemed serious; rolled ankles, cramps and minor knocks would generally not be deemed serious.
From p. 45 - 46 of the 2016/17 FIFA Laws of the Game:
The Referee:
...
Injuries
- allows play to continue until the ball is out of play if a player is only slightly injured
- stops play if a player is seriously injured and ensures that the player is removed from the field of play.
It goes on further to state that the restart of play is a dropped ball.
- if play has not been stopped for another reason, or if an injury suffered by a player is not the result of an infringement of the Laws of the Game, play is restarted with a dropped ball
By playing the ball out when an opponent is only slightly injured, teams are waiving their right to continue playing as an act of respect for their opponents.
Teams will generally play the ball out immediately if one of their teammates is injured, in order to restore their side to full strength. However, they will usually not play the ball out in the middle of a promising attack, since the attack is more important than having a full complement of players.
In previous editions of the Laws, it vaguely stated that the referee could stop, suspend or abandon the match for any outside interference. In the new 2016/17 edition of the Laws, some examples of what may constitute outside interference are provided on p. 47 - 48:
The Referee:
...
Outside interference
- stops, suspends or abandons the match for any infringements of the Laws or
because of outside interference e.g. if:
- the floodlights are inadequate
- an object thrown by a spectator hits a match official, a player or team official, the referee may allow the match to continue, or stop, suspend or abandon it depending on the severity of the incident
- a spectator blows a whistle which interferes with play - play is stopped and restarted with a dropped ball
- an extra ball, other object or animal enters the field of play during the
match, the referee must:
- stop play (and restart with a dropped ball) only if it interferes with play unless the ball is going into the goal and the interference does not prevent a defending player playing the ball, the goal is awarded if the ball enters the goal (even if contact was made with the ball) unless the
ball enters the opponents’ goal.
- allow play to continue if it does not interfere with play and have it removed at the earliest possible opportunity.
On p. 36, the procedure for handling persons other than players entering the field of play is outlined:
The coach and other officials named on the team list (with the exception of players or substitutes) are team officials. Anyone not named on the team list as a player, substitute or team official is an outside agent.
If a team official, substitute, substituted or sent off player or outside agent enters the field of play the referee must:
- only stop play if there is interference with play
- have the person removed when play stops
- take appropriate disciplinary action
If play is stopped and the interference was by:
- a team official, substitute, substituted or sent off player, play restarts with a direct free kick or penalty kick
- an outside agent, play restarts with a dropped ball
If a ball is going into the goal and the interference does not prevent a defending player playing the ball, the goal is awarded if the ball enters the goal (even if contact was made with the ball) unless the ball enters the opponents’ goal.