A school child was taken to hospital after being rescued by emergency crews while descending a popular North Yorkshire beauty spot.