Lorentz transformations appear in general relativity because each tangent space carries a Lorentzian metric. Spacetime need not be flat for this local statement to hold.
This note revises my original Chinese answer.
At an event , choose an orthonormal frame for the metric, so its components are
If another frame at the same event is orthonormal, its change-of-frame matrix satisfies
That is the defining condition for a Lorentz transformation. The relation concerns frames in the tangent space at an event; arbitrary coordinate transformations on a curved region need not be Lorentz transformations.
What a local inertial coordinate system removes
For a sufficiently smooth Lorentzian metric, normal coordinates centered at can be chosen so that
The Christoffel symbols then vanish at . Curvature generally remains in second-order terms, so the metric is not necessarily equal to throughout a neighborhood. Tong's discussion of normal coordinates develops this distinction.
In flat spacetime, inertial Cartesian coordinate systems can instead describe a whole suitable region with constant Minkowski metric. Their transformations are affine:
They are Poincaré transformations, becoming linear Lorentz transformations when the origins coincide. Even vanishing curvature everywhere does not by itself guarantee that a spacetime has the global topology of Minkowski space.
Thus general relativity contains local Lorentz geometry from the outset. Flatness is required for extending the Minkowski description across a region, not for relating orthonormal frames at a point.