Different voltage sources in parallel with a diode
Your assumption that the diode is always off if incorrect. Whether the diode is conducting or not depends on the voltage across R. 

If r is large and R is small the voltage across R can be less than V minus a diode drop, at which time the ideal diode will turn on. A real diode will conduct some before that.







simulate this circuit &ndash; Schematic created using CircuitLab

If the voltage across R is &lt; (V minus a diode drop), the diode is on.

Knowing that, you should be able to figure out the math that defines that condition for various values of V, R and r.