There are two questions here. gdrt's answer covers all aspects of the first, so I will simply summarise before moving onto the second. Firstly:
is there a fixed duration for goal celebration?
No. This is a discretionary decision.
Law 12 - Fouls and Misconduct, Section 3 - Disciplinary Action:
Players can celebrate when a goal is scored, but the celebration must not be excessive; choreographed celebrations are not encouraged and must not cause excessive time-wasting.
Referees must caution players who delay the restart of play by:
- excessively delaying a restart
As for the second question:
could the referee continue the match without telling the team to stop celebrating?
The answer to this is - it depends. If a goal was actually scored, the following must occur before a kick-off can be taken.
Law 8 - The Start and Restart of Play, Section 1 - Kick-off:
For every kick-off:
- all players, except the player taking the kick-off, must be in their own half of the field of play
- the referee gives a signal
If the referee believes that the team who has just scored are celebrating for too long, this is easily solved by moving towards the celebration early, and asking players to move back to their own half. If this does not work, cautions for delaying the restart of play can be issued. Any wasted time should be added on in accordance with Law 7, Section 3 so that the opponents are not disadvantaged.
There is nothing in the Laws stopping the referee from restarting play if all players (other than those temporarily off the field of play due to injury, etc.) are in their own half. While the referee, could do this, this does not mean they should. A kick-off should not be used as punishment to give the opponents a freebie goal. The expectation at a kick-off is that all opponents are ready to defend. Any referee who used their discretion in this manner would likely be criticised in an official performance assessment.
If a goal was not scored, the following applies:
Laws of the Game 2018/19 Practical Guidelines, pp. 197 - 198 [pdf]:
The whistle is needed to:
- restart play for:
- free kicks when the appropriate distance is required
- penalty kicks
- restart play after it has been stopped for a:
- caution or sending-off
The whistle is NOT needed to:
- restart play from:
- most free kicks, and a goal kick, corner kick, throw-in or dropped ball
As seen in this clip of a goal in a match between Deportivo Toluca FC and CF Monterrey, if a goal is disallowed, and there is no injury, caution or send-off, substitution or wall being set at the subsequent restart, the defending team is allowed to put the ball back into play immediately. They did here and managed to score. The lesson here is that players should not celebrate unless the referee has unambiguously signalled for a goal by pointing back towards the centre mark.