If they are in lines spoken by actors, then it may well have the two meanings you suggest. Someone else may come up with the term you are looking for.
All I can think of is:
Ambiguity: When something may convey two or more different meanings. This is usually not intended by the writer.
Double entendre: When something conveys two or more different meanings, one of which is usually related to sex. This is usually intended by the writer/speaker.
Pun: When a word that has more than one meaning, or two words that have different meanings but sound the same (or very similar), are used with humorous effect.
Student or Learner