Correct; in general the speed of light is constant only as measured by local inertial observers.
As an extreme example, consider a photon emitted from a galaxy far, far away, in our direction. Although it moves away from the galaxy in the direction of the Milky Way, the expansion of space makes it increase its distance from us. Eventually, however, it will reach a point where the expansion rate happens to be $c^\dagger$. A local observer at this point would still measure the photon's speed to be $c$, but for a brief period its speed wrt. you vanishes. After this, it will slowly pick up speed (wrt. you), until finally it reaches $c$ when it enters our Local Group (since here, space doesn't expand).
Another example is a photon emitted from a high tower, in the direction of you standing on the ground. Here, the difference in gravitational potential makes the photon have a speed larger than $c$ as measured by you. An observer falling from the tower would be inertial and measure it to have $c$, but you are accelerated by the normal force of the ground and are hence not inertial.
$\dagger$This point is 14 billion lightyears away from us.