It's true that DN 16 says rely on yourself but it doesn't mean you don't need a teacher, just as a student in university relies on his own effort to study for exams, do assignments, projects etc. but may need guidance from his lecturer or professor.
The following sutta states that one who doesn't know what is to be known, should seek a teacher.
The term for teacher here is satthu in Pali. In Pali, there are no definite articles like "a" or "the" and also no upper case and lower case, as in "a teacher" and "the Teacher", so it may very well refer to the Teacher i.e. the Buddha, as it is found in Ven. Sujato's translation.
“Bhikkhus, one who does not know and see as it really is
aging-and-death, its origin, its cessation, and the way leading to its
cessation, should search for a teacher in order to know this as it
really is.
“Bhikkhus, one who does not know and see as it really is birth …
existence … clinging … craving … feeling … contact … the six sense
bases … name-and-form … consciousness … volitional formations, their
origin, their cessation, and the way leading to their cessation,
should search for a teacher in order to know this as it really is.”
SN 12.82 (translated by Ven. Bodhi)
The following sutta shows five ways of learning and practice that leads to liberation. Only the first involves a teacher. So, a teacher is not absolutely necessary.
(1) “Here, bhikkhus, the Teacher or a fellow monk in the position of a
teacher teaches the Dhamma to a bhikkhu. In whatever way the Teacher
or that fellow monk in the position of a teacher teaches the Dhamma to
the bhikkhu, in just that way he experiences inspiration in the
meaning and inspiration in the Dhamma. As he does so, joy arises in
him. When he is joyful, rapture arises. For one with a rapturous mind,
the body becomes tranquil. One tranquil in body feels pleasure. For
one feeling pleasure, the mind becomes concentrated. This is the first
basis of liberation, by means of which, if a bhikkhu dwells heedful,
ardent, and resolute, his unliberated mind is liberated, his
undestroyed taints are utterly destroyed, and he reaches the
as-yet-unreached unsurpassed security from bondage.
(2) “Again, neither the Teacher nor a fellow monk in the position of a
teacher teaches the Dhamma to a bhikkhu, but he himself teaches the
Dhamma to others in detail as he has heard it and learned it. In
whatever way the bhikkhu teaches the Dhamma to others in detail as he
has heard it and learned it, in just that way, in relation to that
Dhamma, he experiences inspiration in the meaning and inspiration in
the Dhamma. As he does so, joy arises in him. When he is joyful,
rapture arises. For one with a rapturous mind, the body becomes
tranquil. One tranquil in body feels pleasure. For one feeling
pleasure, the mind becomes concentrated. This is the second basis of
liberation, by means of which, if a bhikkhu dwells heedful, ardent,
and resolute, his unliberated mind is liberated, his undestroyed
taints are utterly destroyed, and he reaches the as-yet-unreached
unsurpassed security from bondage.
(3) “Again, neither the Teacher nor a fellow monk in the position of a
teacher teaches the Dhamma to a bhikkhu, nor does he himself teach the
Dhamma to others in detail as he has heard it and learned it, but he
recites the Dhamma in detail as he has heard it and learned it. In
whatever way the bhikkhu recites the Dhamma in detail as he has heard
it and learned it, in just that way, in relation to that Dhamma, he
experiences inspiration in the meaning and inspiration in the Dhamma.
As he does so, joy arises in him. When he is joyful, rapture arises.
For one with a rapturous mind, the body becomes tranquil. One tranquil
in body feels pleasure. For one feeling pleasure, the mind becomes
concentrated. This is the third basis of liberation, by means of
which, if a bhikkhu dwells heedful, ardent, and resolute, his
unliberated mind is liberated, his undestroyed taints are utterly
destroyed, and he reaches the as-yet-unreached unsurpassed security
from bondage.
(4) “Again, neither the Teacher nor a fellow monk in the position of a
teacher teaches the Dhamma to a bhikkhu, nor does he teach the Dhamma
to others in detail as he has heard it and learned it, nor does he
recite the Dhamma in detail as he has heard it and learned it, but he
ponders, examines, and mentally inspects the Dhamma as he has heard it
and learned it. In whatever way the bhikkhu ponders, examines, and
mentally inspects the Dhamma as he has heard it and learned it, in
just that way, in relation to that Dhamma, he experiences inspiration
in the meaning and inspiration in the Dhamma. As he does so, joy
arises in him. When he is joyful, rapture arises. For one with a
rapturous mind, the body becomes tranquil. One tranquil in body feels
pleasure. For one feeling pleasure, the mind becomes concentrated.
This is the fourth basis of liberation, by means of which, if a
bhikkhu dwells heedful, ardent, and resolute, his unliberated mind is
liberated, his undestroyed taints are utterly destroyed, and he
reaches the as-yet-unreached unsurpassed security from bondage.
(5) “Again, neither the Teacher nor a fellow monk in the position of a
teacher teaches the Dhamma to a bhikkhu, nor does he teach the Dhamma
to others in detail as he has heard it and learned it, nor does he
recite the Dhamma in detail as he has heard it and learned it, nor
does he ponder, examine, and mentally inspect the Dhamma as he has
heard it and learned it, but he has grasped well a certain object of
concentration, attended to it well, sustained it well, and penetrated
it well with wisdom. In whatever way the bhikkhu has grasped well a
certain object of concentration, attended to it well, sustained it
well, and penetrated it well with wisdom, in just that way, in
relation to that Dhamma, he experiences inspiration in the meaning and
inspiration in the Dhamma. As he does so, joy arises in him. When he
is joyful, rapture arises. For one with a rapturous mind, the body
becomes tranquil. One tranquil in body feels pleasure. For one feeling
pleasure, the mind becomes concentrated. This is the fifth basis of
liberation, by means of which, if a bhikkhu dwells heedful, ardent,
and resolute, his unliberated mind is liberated, his undestroyed
taints are utterly destroyed, and he reaches the as-yet-unreached
unsurpassed security from bondage.
AN 5.26
The following Vinaya quote shows that the Buddha intended for monks-in-training to definitely have a preceptor. That's absolutely required.
At that time the monks did not have preceptors or teachers, and as a
result they were not being instructed. While walking for almsfood,
they were shabbily dressed and improper in appearance. While people
were eating, they held out their almsbowls to receive leftovers, even
right over their food, whether it was staple food, non-staple food,
delicacies, or drinks. They ate bean curry and rice that they
themselves had asked for, and they were noisy in the dining hall.
People complained and criticized them, “How can the Sakyan ascetics
act like this? They are just like brahmins at a brahminical meal.”
The monks heard the complaints of those people. The monks of few
desires who had a sense of conscience, who were contented, afraid of
wrongdoing, and fond of the training, complained and criticized them,
“How can monks act like this?”
They then told the Buddha.
Soon afterwards the Buddha had the Sangha gathered and questioned the
monks: “Is it true, monks, that monks act like this?”
“It’s true, Sir.”
The Buddha criticzed them, “It’s not suitable for those foolish men,
it’s not proper, it’s not worthy of an ascetic, it’s not allowable,
it’s not to be done. How can they act like this? This won’t give rise
to confidence in those without it or increase the confidence of those
who have it, but it will hinder confidence in those without it, and it
will cause some with confidence to change their minds.”
Then the Buddha spoke in many ways in dispraise of being difficult to
support and maintain, in dispraise of great desires, discontent,
socializing, and laziness; but he spoke in many ways in praise of
being easy to support and maintain, of fewness of wishes, contentment,
self-elimination, ascetic practices, serenity, reduction in things,
and of being energetic. After giving a teaching on what is right and
proper, he addressed the monks:
“There should be a preceptor.
The preceptor should regard his student as a son and the student his
preceptor as a father. In this way they will respect, esteem, and be
considerate toward each other, and they will grow and reach greatness
on this spiritual path.
And a preceptor should be chosen like this:
After putting his upper robe over one shoulder, a student should pay
respect at the feet of a potential preceptor. He should then squat on
his heels, raise his joined palms, and say, ‘Venerable, please be my
preceptor.’ And he should repeat this a second and a third time. If
the other makes it understood by body, by speech, or by body and
speech: ‘Yes,’ or, ‘No problem,’ or, ‘It’s suitable,’ or, ‘It’s
appropriate,’ or, ‘Carry on with inspiration’—then a preceptor has
been chosen. If the other doesn’t make it understood by body, by
speech, or by body and speech, then a preceptor hasn’t been chosen.
Pli Td Kv1 sub-chapter 15
The qualities of a good teacher and preceptor can be found in Pli Td Kv1 sub-chapter 16, Mil 4.5, AN 5.159.
And finally we have the famous Rhinoceros Sutta telling us that for renunciants on the path to liberation, it's best to find companions who are on par or better. If not found, then go alone.
If you gain a mature companion,
a fellow traveler, right-living & wise,
overcoming all dangers
go with him, gratified,
mindful.
If you don't gain a mature companion,
a fellow traveler, right-living & wise,
wander alone
like a king renouncing his kingdom,
like the elephant in the Matanga wilds,
his herd.
We praise companionship — yes!
Those on a par, or better,
should be chosen as friends.
If they're not to be found,
living faultlessly,
wander alone
like a rhinoceros.
Rhinoceros Sutta (Snp 1.03)