Using deep Chandra observations of the globular cluster M28, we study the quiescent X-ray emission of a neutron star in a low-mass X-ray binary in order to constrain the chemical composition of the neutron star atmosphere and the equation of state of dense matter. We fit the spectrum with different neutron star atmosphere models composed of hydrogen, helium or carbon. The parameter values obtained with the carbon model are unphysical and such a model can be ruled out. Hydrogen and helium models give realistic parameter values for a neutron star, and the derived mass and radius are clearly distinct depending on the composition of the atmosphere. The hydrogen model gives masses/radii consistent with the canonical values of 1.4 Msun and 10 km, and would allow for the presence of exotic matter inside neutron stars. On the other hand, the helium model provides solutions with higher masses/radii, consistent with the stiffest equations of state. Measurements of neutron star masses/radii by spectral fitting should consider the possibility of heavier element atmospheres, which produce larger masses/radii for the same data, unless the composition of the accretor is known independently.