A NSW police officer has been left seriously injured after he and another officer were attacked on a busy Sydney road while off-duty.