Can iPad be upgraded to iOS8 if desktop is running lion?
Per Apple's iTunes 12.0.1 support article, OS X v10.7.5 (last version of Lion) is the minimum requirement for iTunes 12, which in turn is required to sync a device that is running iOS 8.

Based on this, it can be done. Not sure if I'd want to (performance may be horrendous in iTunes on hardware that is closing in on a decade old, and that wasn't particularly powerful even in its time) but it's possible.

You're probably safe til next September/October when iOS 9 (will presumably) be released - it will probably align with iTunes 13 that would almost certainly drop Lion support.