Is there a current in \$R_1\$ in this precision rectifier if so, where does it go?
But then where does it go? I cannot see a closed loop in which current
can flow. It can only go through D1 but then it cannot flow back into
op amp.

Sure it can (but not through D1). The op-amp output will be about 0.7 volts negative (in order to preserve the virtual ground at -Vin) and positive current will flow through R1, then through D2 and to the op-amp output: -