Ultra-high-energy cosmic rays (UHECRs) have been tried to be related to the most varied and powerful sources known in the universe. Gamma-ray bursts (GRBs) are natural candidates. Here, we argue that cosmic rays can be accelerated by large amplitude electromagnetic waves (LAEMWs) when the MHD approximation of the field in the wind generated by the GRBs magnetized central engine breaks down. The central engine considered here is a strange star born with differential rotation from the accretion induced conversion of a neutron star into a strange star in a low-mass X-ray binary system. The LAEMWs generated this way accelerate light ions to the highest energies $E = qetaDeltaPhi_{max}$ with an efficiency $eta sim 10^{-1}$ that accounts for all plausible energy losses. Alternatively, we also consider the possibility that, once formed, the LAEMWs are unstable to creation of a relativistically strong electromagnetic turbulence due to an overturn instability. Under this assumption, a lower limit to the efficiency of acceleration is estimated to be about $eta sim 10^{-2.5}$. Due to their age, low mass X-ray binary systems can be located in regions of low interstellar medium density as, e.g., globular clusters or even intergalactic medium in case of high proper motion systems, and cosmic ray energy losses due to proton collisions with photons at the decelerating region are avoided, thus opening the possibility for particles to exploit the full voltage available, well beyond that currently observed.