Gonality of curves with a singular model on an elliptic quadric surface