Investigation of in-chain spin correlations in YBa2Cu3O6+x by neutron polarization analysis