Create constant length object for manipulation
If you are looking for a mathematically perfect solution that keeps the exact length and volume of the geometry then I don't know how to achieve that. AS far as I know Blender might not even be the right tool for that job.

For a relatively accurate from a visual point of view you may use the usial Array + Curve modifier duo.

Just model a small cylinder-shaped section of your string (or whatever detaild shape you want to have) and add an Array with a fixed count of items, this will ensure the length is kept approximately constant.

On top of it add a Curve modifier, that will deform it so you can controll bending and knots without affecting length too much.



Bending will however affect lenght and the distortions will inevitable change the volume, but visually it will roughly behave as a tring