Yes, it can happen. Coughing up phlegm without being sick can happen during allergies or heartburn and even when someone smokes.