It depends on the lines and their locations. If you're talking about a line that or pattern that moves across the display in a semi-orderly manner it's likely the logic board. If you're talking about a line or sets of lines that "kick on and kick off" sometimes staying on for a while, then it's the display.
The types of lines in the latter case will run the whole length of the display (top to bottom or left to right for each line) and each line will usually be just one color only (one might be white, one might be blue, etc). It could also be a cable issue, but I doubt it.
The displays have a circuit board lying across the back and side(s) of the display. It's glued in place. When the glue starts to separate, some of the traces start making intermittent contact and the result is a "light show." The 17" 2006 iMac's were famous for this. Go to eBay and do a search for 2006 17" iMacs (I know, I know, you have a MacBook Pro) and see if you can see some of the units on display there that have photos of the problem. If that's what yours looks like, then the display is almost certainly the problem.