I was talking to someone about puns and she said that it's a play on words,
e.g. "those two pears are a pear of green balls" (sorry about the awful example, I couldn't think of any others on the spot).

I argued that this is a pun:

John Lydon looked out of his bedroom window and said, "Ah, how I love country life". (John Lydon stars in a butter advert which has the phrase "country life" in it).

Both qualify as puns. I think you meant to say, "those two pears are a pair of green balls."

The first case is an example of paronomasia--wordplay that is based on homophonic or near-homophonic resemblance. The words pear and pair are exact homophones, as are whole and hole, words that sound alike, but are spelled differently and mean different things. A good example of paronomasia based on near homophones is Apple's new slogan for the ipad--Resolutionary (revolutionary).

The second case qualifies as a double entendre. The meaning of "country
life" turns on two different senses, but not two different spellings.

Based on these remarks, you should now be able to classify this pun. A pun is its own reword.

All puns are paronomasia - OED:"Wordplay based on words which sound alike; an instance of this, a pun." Two words that sound the same in one sentence doesn't make a pun as there is no double meaning. Looking at the two pears and saying "that is a nice pair/pear" would be a pun. The second is not double entendre. A double entendre is a phrase with two meanings, one of which is usually risque, but the second meaning lies outside the phrase itself. "Children make nutritious snacks" has two possible meanings, but doesn't contain a word/phrase that has a double meaning, as'country life' does.
–
Roaring FishMay 20 '12 at 15:41

I down voted this question on the basis of what @RoaringFish had to say
–
Olly PriceMay 20 '12 at 15:57

The classic "pear/pair" double-entendre: Buxom young woman holding two watermelons: Can I interest you in these, sir? Man: Why, what a lovely pair! Woman: They're not pears, they're melons. Man: Whatever you call them, they are beautiful.
–
Andrew Leach♦May 20 '12 at 17:26

@Olly: I think the downvote is harsh. I'd regard it as a pun (wordplay), even if it happens to be a rather low-quality pun. Collins defines pun as the use of words or phrases to exploit ambiguities and innuendoes in their meaning, usually for humorous effect; a play on words. Note the word "usually" in that definition. The fact that you misspelled the word "pair" indicates some basic level of punning. Had you said, "Those two apples are a pair of green balls," I'd see no pun at all, but I suspect you chose "pears" for a reason.
–
J.R.Nov 11 '12 at 12:28