Yes. The mid-2007 iMac with 10.4.10 and mid-2007 MacBook Pro with 10.4.9 can be upgraded to 10.8, through 10.11 (although since 10.9, and 10.10 are no longer available, you'll have to find someone with a fully downloaded copy that is willing to give up their license if you didn't download them earlier). 10.11 is available for these Macs as well. Older MacBook Pros and iMacs can't upgrade to 10.8 or 10.9. Although if they have a Core2Duo processor they can upgrade to 10.7.5 with the same process below. CoreDuo, CoreSolo processors can only upgrade to 10.6.8. G5 processors, and G4 processors with a minimum of 867 Mhz can only upgrade to 10.5.8 (although note they will lose access to Classic compatibility).
No Mac Mini, Mac Pro*, MacBook (without secondary name), with 10.4 installed, may be upgraded to 10.8 through 10.11.
To determine what system was prebundled with your Mac, see this tip if you lost your discs or bought it used or refurbished without discs:
This user tip explains the process to upgrade:
Note: Additional systems that had 10.5 preinstalled can also upgrade to 10.9 or 10.10 or 10.11, following the steps on the following tip:
* An unsupported method of upgrading older Mac Pros with 10.4.7 or later is on this tip: http://www.jabbawok.net/?p=47
Mac OS Sierra 10.12 is not compatible with any Mac that came with 10.5 or 10.4. See Which 10.6 Macs can install Mac OS Sierra through Mojave (10.12-10.14) for the ones that can.
10.8 through 10.11 have the same base system requirements, however individual features may have different system requirements.