There's a fundamental word missing there: what you wrote is true for elementary reactions, that is, reactions that take place in a single step with a single transition state.
In an elementary reaction, then, what actually takes place at a microscopic levels fits the reaction formula we write (if we express the reaction as $\ce{A + B -> C}$, a molecule of $\ce{A}$ and a molecule of $\ce{B}$ actually collide and produce a molecule of $\ce{C}$ as a single step). But, in general, that's not the case; reactions in general have mechanisms comprising one or more elementary reaction steps.
A related concept is the molecularity of a reaction step, that is, the number of molecules that intervene in a certain step. Since elementary reactions match their chemical expression, if a reaction is elementary, the order of a reagent will match its stoichiometric coefficient (which is your question: that means that $a=n_a$ and $b=n_b$). This is not the case for multi-step mechanisms - kinetic order is not related to stoichiometry in general (and you can have the reaction rate depend on concentrations that don't even appear in the formula, such as in homogeneous catalysis).
Note also that molecularity is always low - the vast majority of reactions have molecularity 1 or 2 (meaning 1 or 2 molecules are involved). Molecularity 3 involves the simultaneous and spatially productive collision of 3 molecules so it's very, very rare - and molecularity 3 reactions are only observed for a few systems. As far as I know, no reactions with molecularity 4 have been observed at the macroscopic scale.
Note also that there's no way to know a priori if a reaction is elementary. Some reactions are clearly multi-step (for instance if the formula involves more than three molecules), but finding out if a simple reaction is elementary or complex requires empirically measuring its order, proposing mechanisms, testing for intermediates and transition states, and is always open to reassessment.