In general, you can damage your lens if you turn the focus ring while in autofocus mode. The exception is ring-type lens motors, which are often branded "ultrasonic" or similar. (Nikon uses "Silent Wave Motor", although it unhelpfully uses this designation for both ring and "micromotor" designes). There are also some Pentax lenses which have a clutch mechanism.
Assuming that this 18-140mm is your lens, note that it's explicitly listed as having "full-time manual focus override". This means that it either has a ring-type motor, or a clutch mechanism, so it should be safe.