I believe this would only mask the direct sound waves, not the reflections caused by the room. Perhaps masking the direct sound is enough, but maybe not if the reflections have sufficient energy.
The brute force way is to do an exhaustive search, repeatedly correlating the signal you are looking to cancel and the received signal, whilst "sliding" the known signal across the received signal, which means adding a delay to the known signal between each correlation. Correlation peaks can be picked out and used to cancel the reflections. Similar techniques are regularly used in radio communications, to combat multipath fading, which is a fancy way of saying that the received radio signal contains reflections.
Edit: remove cruft at end of comment.