There is some evidence that there were species of dinosaur that had feathers, but these were not necessarily the ancestors of modern birds.
<a href="https://commons.wikimedia.org/wiki/File:Sinosauropteryx_color_pattern_(feathers).JPG" target="_blank" rel="noopener">Source</a>
Sinosauropteryx (see above) was a carnivorous dinosaur that lived around 125-120 million years ago in what is now China. It was about one metre long. The fossils that have been discovered show that, instead of reptilian scales, parts of its body were covered by feathers.
<a href="https://commons.wikimedia.org/wiki/File:Avimimus_(_feathers_).JPG" target="_blank" rel="noopener">Source</a>
Avimimus (see above) was a much later dinosaur (75-70 million years ago), also from China/Mongolia but slightly larger than Sinosauropteryx at 1.5 metres long, that also shows evidence that it bore feathers. This is due to the fact that its arm bones bore ridges of the same size and shape as those found on modern birds. It also had a mouth that was a similar shape to that of a bird’s beak.
So can these dinosaurs be seen as the direct ancestors of birds? The answer is “almost certainly not”, because the fossil record indicates that birds evolved from a completely different ancestry.
In that case, what was the function of the feathered arms if they were not the precursors of wings?
The suggestion has been made that these dinosaurs were warm-blooded and they evolved feathers as a means of keeping warm in winter. Other dinosaur species appear to have evolved fur for the same reason. It might also be that coloured feathers could have been useful as camouflage for small dinosaurs seeking to hide in vegetation.
It is a frequently made mistake to assume that the process of evolution implies some sort of purpose, in that each change between species of different time periods denotes a continuous progress from primitive to advanced.However, that is not the way that evolution works. There are many “dead ends”in the story of evolution, so it should not surprise us to find common features in more than one evolutionary sequence of creatures, but also to find that these features performed different functions. There was never any certainty that feathers would lead inevitably to flight. It just so happened that down one evolutionary path this was the end result, but that was not the case with the two species mentioned above.