I assume that the white mucus and bubbles you referred to was found in the sputum after you experienced a bout of acid reflux.
Whenever you experience such an episode, acidic contents from the stomach have reached your oesophagus and sometimes your mouth. As the linings in the esophagus and oral cavity are not meant to withstand acid, our body reacts by producing more secretions to protect its lining.
In some cases, the acid content can cause chest pain known as heartburn or trigger a cough reflex. At other times, it can also induce mild asthmatic attacks.
Depending on the frequency and severity of the acid reflux, you may or may not require treatment. If your problems persist or discomfort gotten worse, do get an assessment with your doctor to see if further investigations or treatment is required.
Dr Quan