That won’t ruin fasting for weight loss. Half a lemon is, what, 10-20 calories depending on size? A few carbs? Even less when you’re not actually eating it. Not a big deal. It’s a hell of a lot better than using artificial sweetener to sweeten 3L of water.
Not great for your teeth, though. The acid is bad for your enamel. If you’re drinking plenty of water while chewing on the lemon, you may be diluting it enough, but if you’re going to do this every day for an extended period, you should probably discuss it with your dentist. Would you be ok with some lemon juice in your water?