To find another way into the castle ride out of the town. On the other side of the bridge turn right. At the next intersection turn right again. Follow the path until you get to a shrine:
Get off the horse and go into the river. Go into the cave ahead: