Measurement of electric-field noise from interchangeable samples with a trapped-ion sensor