Why would you want to do this anyway.? dont you know what your input voltage is ,isn't it a fixed value.?
Use a comparator and bias the - side at (lets say 3V below the reg input voltage if the reg dropout was 2.5 V )by using diode drops or a zener and resistor to get the required fixed voltage drop below input voltage ,then tie the compare + side to the ouput side .So the comparator goes high when they are equil ,then use that output to drive your "warning approaching dropout led" directly. I am assuming your input will always have some minimum voltage available to drive your led and comparator.
You could do it simpler with a single transistor biased across the input and output so it is normally on and driving a led ,but then it will switch OFF when the voltage difference drops below a certain threshold you have set with a biasing zener,or diode in the base .So this would be opposite than with the comparator ,here the LED being on when ok then switching off when approaching dropout voltage.
Quote :- "so I could adjust depending on the minimum input I need for the desired LM317 output"
The minimum input you will need will always be your required output + dropout voltage of the regulator which is constant . (~2.5V for lm317) so you dont need to adjust the warning reference.