The only relevant factor is airspeed. If the plane is unable to generate sufficient airspeed to take of... for whatever reason... it will fail to take off. If it manages to generate sufficient airspeed it will take off. You may argue any hypothetical scenario you want, but it will always boil down to airspeed.
The original poster suggested "the aircraft would not be able to lift off if it was on a treadmill because the treadmill would match its speed." That means that if the aircraft was travelling at 100 mph the treadmill would spin at 100 mph in the opposite direction. The wheels of the aircraft would thus be rotating at 200 mph. The airspeed would still be 100 mph and if that is sufficient the aircraft would take off. You may argue that the landing gear would fail or any other hypothetical scenario, but it ultimately boils down to airspeed.