The answer from Thomas Owens is correct. However, I would like to add that depending on the team organization, I think it's acceptable to do some of the ceremonies outside of the 2 weeks considered as being the sprint (or whatever length your sprint is).
For example, I've encountered teams preferring to do the planification for sprint N on the last day of sprint N-1 (review in the morning, planning in the afternoon) or the sprint review for sprint N on the very first day of sprint N+1 (honnestly this one I'm not too fond of as it makes you look backwards to the previous sprint rather than forward, when you already psychologically shifted to the new sprint and should rather be looking forward).
Anyway, basically this is still some time taken for specific ceremonies in a sprint, it doesn't really matter if the ceremonies belong to the previous one, the current one or the next one as long as you keep the same rythm.
Note that in order to get the full benefit of sprint review it should happen before the sprint planning so that the input from the stakeholders have a chance to be taken into account in the sprint.
That said, as you should theoritically always be in SOME sprint, I'm not sure when you would expect to do these ceremonies outside of any sprint?