Heirloom weapon has gone through some eratta to it since it was first brought about. Currently it reads:
You carry a non-masterwork simple or martial weapon that has been passed down from generation to generation in your family.
*Benefit: When you select this trait, choose one of the following benefits:
proficiency with that specific weapon
a +1 trait bonus on attacks of opportunity with that specific weapon
a +2 trait bonus on one kind of combat maneuver when using that specific weapon.
Note: You pay the standard gp cost for the weapon.
So, you'd get lance proficiency, but only with the basic, non-magical, non-masterwork lance that is your heirloom weapon. You might be able to upgrade it further with use of the Masterwork Transformation spell, and from there magical enhancements, but if something happens to that lance, you're basically out of luck.