It can happen by chance, that's the idea of an "asterism". As others have said there are so many stars in the sky, especially seen through a telescope that you are bound to see many patterns in them.
Depends how perfect the line is. But this is the Kemble's cascade
Kemble's Cascade Photograph Moore Winter Marathon #17 : Kemble's Cascade by Wayne Young
Quite an impressive Asterism :).
Zoom in on the image:
I make that about 11 stars almost on a straight line depending which ones you count. With the other stars in the "cascade" usually said to have around 20 stars in it.
Another image, high resolution on APOD: APOD: 2010 January 28
And instructions on how to find it in 7 by 50 binoculars: Kemble's Cascade in Camelopardalis
And - the thing is if you did see a row of stars all in a line like that, maybe even straighter than that one - it's an asterism for that particular moment of time only. The stars are continually moving. And it would be a huge coincidence if all those nine stars were travelling parallel to each other at the same speed as seen from Earth. And wouldn't be stable anyway as they would be influenced by the gravitational attraction of each other and other stars.
Here is how some familiar constellations will change with time in the future as animated gifs:
GIFs Show Constellations Transforming Over 150,000 Years
Chart here
Constellations throughout the ages Copyright © 2016 Halcyon Maps & Martin Vargic
I wonder what will happen to Kemble's Cascade 150,000 years from now?