The velocity of light in vacuum is the same for all inertial observers. This means $$\frac{dx}{dt}=\frac{dx'}{dt'}=c\\ \Rightarrow {(c\,dt)}^2-dx^2=0={(c\,dt')}^2-{dx'}^2.$$ I think that without further work, it is not obvious that for arbitrary nonzero values of ${(c\,dt)}^2-dx^2$, the equality $${(c\,dt)}^2-dx^2={(c\,dt')}^2-{dx'}^2$$ will hold true.
Given the postulate of the constancy of the speed of light, if we were to find how $(t,x)$ must transform, we can make use of the first equality only - a weaker condition than the second equality. But it is usually derived using the stronger condition (second equality) which assumes the equality for arbitrary values of ${(c\,dt)}^2-dx^2$.
If we strictly have to follow the postulate, IMO, we must derive the Lorentz transformation equations in two steps as follows.
Step 1. First, we assume $$c\,t'=A\,c\,t+B\,x,\quad x'=K\,c\,t+D\,x.$$
Step 2 Then make use of two conditions ${(c\,dt')}^2-{dx'}^2=0$ and ${(c\,dt)}^2-dx^2=0$.
We start with $${(c\,dt')}^2-{dx'}^2=0\\ \Rightarrow (A^2-K^2)\,c^2dt^2 + (B^2-D^2)\,dx^2 + 2(AB-KD)\,c\,dt\,dx=0$$ Now the only condition that we can use is $c\,dt=\pm dx$, which is insufficient to find all the four unknown constants.
Does this mean that one cannot derive the Lorentz transformation equations from the constancy of the speed of light only?