Eating while fasting does break the fast.
I usually wait until I break the fast to flush. I have done it while fasting, and it works, but unless you are ill and there is a good reason to flush you should probably wait, as oil is usually avoided on a juice fast.
It does work tho if you are fasting. It is the oil that causes the bile