In short, no.
The measurement required to provide correct phase-cancellation in a headset is measured in microns, not inches.
You could neither measure it accurately enough nor stay still enough for it to work.
You would also suffer so much throughput latency in hard & software that any attempt at correction would arrive far too late to be of any use.
Some people seem to object to my definition of the precision required for this to be effective.
Let's add more to that.
Not only do you need your distances to be accurate for the gap between mic & speaker, but you also need to be feeding the resultant audio back at the correct phase with regard to the speaker/mic orientation.
If you are trying to do this using a mic oriented at approximately 90° to the headphone speakers, assuming you are facing the computer, your chances of success are even smaller.
You then need to decide which phase you are going to send to which ear. Are you going to guess at an approximation of the 90° & then flip one by 180° compared to the other?
Does that better explain why these systems are measured in microns, not inches? It has little to do with the wavelength at any given frequency & more to do with the orientation of your phase... otherwise you are just as likely to reinforce the wave as to cancel it.