The correct way to set or clear a bit in a holding register is to use Modbus function code 22 (16 hex). Ignition’s Modbus V2 OPC-UA driver supports that. The problem is that very few Modbus slaves support this function code. Even Schneider/Modicon’s M340 and Control Microsystems SCADAPacks don’t support it.
There is certainly a timing problem with setting or clearing a bit in the last read copy of a holding register and then writing it back out using FC 16 or FC 6. But timing problems are all over the place in industrial automation. Where are the block writes to ensure that structured, related data in written at once in anyone’s implementation of OPC? What’s preventing an HMI from clobbering half of a Modbus floating point number? Worse than that, some AB PLCs will update their discrete inputs during a logic scan.
What I’m saying is that the timing problem is not solved in industrial automation, and won’t be, anytime soon. As you continue to work on your Modbus OPC_UA server, consider that you will do no additional harm by supporting bit writes to registers using FC 16 or FC 6, and make me, at least, a happier camper.