Computational indistinguishability: are function parameters known?
You're right: If you know the setup, calculating the next output from any given $x$ is fully deterministic and you know everything already.

Even if you don't know $a$ and $b$, those are easy to calculate from three consecutive $x_i$. If $n$ is not known, its calculation is still pretty easy, given a few consecutive $x_i$.

Anyway, LCGs are very unsuitable for cryptographic tasks. That's why in pretty much every standard library you find a warning not to use the standard Random class for cryptographic protocols (at least for Java and Python I know those warnings are there).

Usually not the entire output is used, but only a part of it, because otherwise two consecutive numbers can't be equal (and ever change again afterwards). Such an RNG is good enough for almost all non-security-related context, where randomness is needed (it is good enough for a little randomness. But e.g. in simulations, where a lot of random numbers are needed, you want "better" randomness, e.g. from the Mersenne Twister). Anyway, predictable PRNGs (without the CS) based on any such construction is not suited for cryptography. For CSPRNGs, you can find a couple of designs on wikipedia.