The Church being the Body of Christ and founded by our Lord does not ever require us to do anything that would harm our health, therefore medications or food that may be required to maintain health are permitted. It is for that reason that someone who is ill, or in danger of death may be administered communion or in the case of someone who is dying but still able to swallow, and alert enough to know what they are doing in the reception of communion to have the sacrament administered even if they have just eaten.
Even in the days of the midnight fast, (Which most Eastern Rite Catholics and Eastern Orthodox still hold to) some people who where prone to scruples, would worry about swallowing a little water and toothpaste if they brushed their teeth before communion. A non-intentional swallowing of toothpaste was not considered enough to bar one from the reception of the Blessed Sacrament. Convincing someone with scruples of that was another issue.
As each case if individual, if someone is not sure, they should take the issue up with his or her confessor or spiritual director, (if in fact they are two different priests)