If it already runs CM then, yes, it will get an update to Nougat and presumably whatever comes after that. Timing maybe an issue. Haven't seen anything on CM about Nougat but my S5 builds have been getting very busy recently presumably because of upstream work: security fixes are generally pushed pretty quickly.
The support for CM for many devices is quite often breathtaking. Well worth taking a look to see if anything you have is supported.