Exactly. This has been used before for short-range sensors, modulating the outgoing light electrically. Microsoft used it in the second generation Kinect. Mesa Imaging used it in 2013.[1] The prototype of that was shown in 2003.[2] I looked into this in my DARPA Grand Challenge days.
Since it's a continuous emission system, you need enough continuous light to overpower other light sources. Filters can narrow the bandwidth, so you only have to be brighter at a specific color. This works badly outdoors. Pulsed LIDARs outshine the sun at a specific color for a nanosecond, and thus can be used in bright sunlight. Also, they tend not to interfere with each other, because they're receiving for maybe 1000ns every 10ms, or 0.01% of the time. A little random timing jitter on transmit can prevent repeated interference from a similar unit.
So, short range use only. For more range, you have to use short pulses.
For short range, there's another cheap approach - project a pattern of random dots and triangulate. That was used in the first generation Kinect and is used in Apple's TrueDepth phone camera.
[1] https://www.robotshop.com/community/blog/show/mesa-imagings-...
[2] https://www.researchgate.net/publication/228602757_An_all-so...