Here's a very simplified diagram:
The whole left side of the diagram is not important or needed to answer the question, it is just there to show a visible spectrum beam also is shone where the infrared laser fof the sensor is shone.
the sensor I'm thinking of using is VL53L0X Time-of-Flight Distance Sensor https://www.pololu.com/product/2490
To summarize the IR beam is aligned with the projection beam (after that is affected by a shifting lens), is reflected by a freeform (think parabolic) mirror onto a retro-reflective surface and back.
I think this should work but not sure about the freeform mirror part. It will distort the beam profile and divergence.
I cant find enough info on how the sensor exactly works but I do know it uses a 940nm laser beam and sensor for it and use pulses to determine distance.
I can only assume from the above and from the fact that the pinhole sensor and diode are next to each other that 1) the visible spectrum beam shouldnt interfere with it 2) beam profile shouldn't matter 3) beam brightness loss shouldnt matter as long as it is bright enough for the sensor 4) the sensor and/or diode are angled a little on the chip and rely on this and/or beam divergence to make sure the beam hits the sensor for the min and max supported distances. So it should end up where it came from in this setup.
But these are just assumptions, if anyone can verify these or explain the actual working it would help.