The residual stress significantly affects the operational safety of oil and gas pipelines. Traditional ultrasonic stress measurement methods require pipeline surface pretreatment, which reduces detection efficiency. EMAT, as a non-contact measurement method, shows promising applications for residual stress detection in oil and gas pipelines. Therefore, based on field conditions for residual stress detection in oil and gas pipelines, this study prepared X80 pipeline steel specimens with epoxy resin coatings of 0.58 mm, 1 mm, 1.58 mm, and 1.9 mm thickness to verify the influence of coating thickness on the stress measurement accuracy of EMAT. Additionally, X80 pipeline steel specimens with varying surface roughness were prepared to study the impact of surface roughness on the residual stress measurement. The results indicate that within the range of coating thickness variations, the residual stress measurement error falls in the range of 50 MPa, while the change of residual stress caused by surface roughness is less than 30 MPa. This validates the feasibility and accuracy of the EMAT method for residual stress measurement in in-service pipelines without the need for surface treatment.