When a team scores in the last play of the match, do referees end the match then, or do they wait for the conceding team to kick-off?
Yes. It happens. Here is a cool story about it:
On 03/03/2013, during a game that was to be named as The last derby match in İnönü Stadium between Beşiktaş and Fenerbahçe, score was 2-2 on minute 90+2. Olcay Şahan scored from a counter attack to make it 3-2 to the home side and referee ended the game without a kick-off.
It caused lots of mocking by Beşiktaş fans for a long time. They shared statistics like Fenerbahçe to kick-off 7 months after that last goal on social media, before the first Fenerbahçe v. Beşiktaş game after that game. Oddly enough, the same thing happened again in that match too.
Fenerbahçe being hosts this time, they were leading 2-1 on minute 45. The stoppage time last lifted as three minutes. Hugo Almeida of Beşiktaş scored on 45+1, equalizing the score. Right after kick-off, he scored again, switching the lead to Beşiktaş in last seconds of 45+3. The referee ended the first half after that goal. Beşiktaş started the second half so Fenerbahçe didn't even get to kick-off for that goal they conceded.
So yes. Referee can blow for both half-time and full-time after a goal.
There is no concept of "last play of the match" in football. When the referee has decided that the second half and any added time in the second half have concluded, the match is terminated. Unlike in many other sports, the team with the ball is not allowed to continue playing until the ball goes out / they lose possession.
However, most referees will not end the match if there is a promising attack underway. As the allowance for additional time is inexact and at the referee's discretion, and they can always "find" a few more seconds to avoid controversy, such as in the 1978 World Cup Finals group stage game between Brazil and Sweden.
The IFAB Laws of the Game state the following:
A match lasts for two equal halves of 45 minutes which may only be reduced if agreed between the referee and the two teams before the start of the match and is in accordance with competition rules.
Allowance is made by the referee in each half for all time lost in that half through:
- assessment and/or removal of injured players
- wasting time
- disciplinary sanctions
- stoppages for drinks or other medical reasons permitted by competition rules
- any other cause, including any significant delay to a restart (e.g. goal celebrations)
Therefore, if time expires (including all allowance for time lost) between the goal and subsequent kick-off, the match is complete, unless the referee decides that there has been time lost before the expiration of time (due to excessive celebration, etc). If this is the case, the kick-off is taken and the match continues for the time lost which may be anywhere from seconds to minutes.
Note that if the goal comes from a penalty kick for which time has been extended for its completion, the match would be over after the penalty is either scored or missed, and there would be no play after its completion.
This is explained in Law 7.4 - Penalty Kick:
If a penalty kick has to be taken or retaken, the half is extended until the penalty kick is completed.