This one is tricky. You are right, the astronaut will see that 6 years have elapsed since he started on the earth's clock.
However, to what the formula for time dilation refers is the time it takes for an event to happen as observed on that events clock as compared to the clock on earth. An observer on earth would see after ten years on earth, that the astronaut is still on his way, the observer on earth does not see him arrive after ten years, but he sees light that has started earlier. The observer on earth sees the astronaut on his way and he reads the astronaut's clock to show 6 years, while the clock on earth shows 10 years. The moving clock goes slower.
Once the observer on earth sees the astronaut arrive, he will see 10 years on the astronaut's clock, but 16.7 years on his own clock on earth. Therefore the astronaut's clock appears to be moving slower. This is what time dilation is meant ot describe, a moving event as seen by a resting observer in a different state of motion (resting is a poor word for that).
The opposite observation is also true, although there is no event. The event is the arrival of the astronaut, the time taken on the astronaut's clock is 10 years, no matter whether this is observed from the spaceship or earth, however when the observer on earth sees the astronaut arrive he sees that on earth 16.7 years have elapsed.
For the opposite observation the event could be, when does the clock on earth show that ten years have elapsed. Obviously the observer on earth sees that as ten years, however, the moving astronaut would see this to happen after 16.7 years as read on the clock on the spaceship, provided he would travel past the target star at 0.8 * c until the 16.7 years have elapsed. When he then compares time he sees his own clock to show 16.7 years and the clock on earth to show 10 years, meaning the clock on earth, the moving clock to him, goes slower for the astronaut.