Glycopyrrolate is used in combination with other medications to treat ulcers. Glycopyrrolate is in a class of medications called anticholinergics. It decreases stomach acid production by blocking the activity of a certain natural substance in the body.