The primary source for The Parable of the Ferryboat is found in MAJJHIMA NIKAYA 22, Alagaddupama Sutta, The Water-Snake Simile, as the Buddha explains the proper attitude to take to the Buddha Dharma using the parable:
"Monks, I will teach you the Dhamma compared to a raft, for the purpose of crossing over, not for the purpose of holding onto. Listen and pay close attention. I will speak."
"As you say, lord," the monks responded to the Blessed One.
The Blessed One said: "Suppose a man were traveling along a path. He would see a great expanse of water, with the near shore dubious and risky, the further shore secure and free from risk, but with neither a ferryboat nor a bridge going from this shore to the other. The thought would occur to him, 'Here is this great expanse of water, with the near shore dubious and risky, the further shore secure and free from risk, but with neither a ferryboat nor a bridge going from this shore to the other. What if I were to gather grass, twigs, branches, and leaves and, having bound them together to make a raft, were to cross over to safety on the other shore in dependence on the raft, making an effort with my hands and feet?' Then the man, having gathered grass, twigs, branches, and leaves, having bound them together to make a raft, would cross over to safety on the other shore in dependence on the raft, making an effort with his hands and feet. Having crossed over to the further shore, he might think, 'How useful this raft has been to me! For it was in dependence on this raft that, making an effort with my hands and feet, I have crossed over to safety on the further shore. Why don't I, having hoisted it on my head or carrying on my back, go wherever I like?' What do you think, monks: Would the man, in doing that, be doing what should be done with the raft?"
"No, lord."
"And what should the man do in order to be doing what should be done with the raft? There is the case where the man, having crossed over, would think, 'How useful this raft has been to me! For it was in dependence on this raft that, making an effort with my hands and feet, I have crossed over to safety on the further shore. Why don't I, having dragged it on dry land or sinking it in the water, go wherever I like?' In doing this, he would be doing what should be done with the raft. In the same way, monks, I have taught the Dhamma compared to a raft, for the purpose of crossing over, not for the purpose of holding onto. Understanding the Dhamma as taught compared to a raft, you should let go even of Dhammas, to say nothing of non-Dhammas."