Q:

How can I use a instance variable to accomplish the same task?

Here I use a global variable to store a list because I can't figure out how I can keep ahold of a list long enough to check its values for duplicates. 
$list = []
def hand_out_gift(name)
  if $list.include?name 
    puts "No present for you"
  else 
    $list.push(name)
  end
end

hand_out_gift("Peter")
hand_out_gift("Alison")
hand_out_gift("John")
hand_out_gift("Maria")
hand_out_gift("Peter")

How can I accomplish the same check with an instance variable?

A:

Ruby works best when you approach your problem using object oriented code.
More often than not, you'll want to think of your data as objects with their own properties and methods, rather than as consequences of data structures that reside in the scope you're working on (global in your example, or local if you edit it per the other answer).
Here's a convoluted example to illustrate:
class Party
  def initialize(members = nil)
    @members = {}
    invite(*members) if members
  end

  def members
    @members.values
  end

  def invite(*members)
    members = Hash[members.map { |member|
      if member.is_a?(Member)
        [member.name.downcase, member]
      else
        [member.downcase, Member.new(member)]
      end
    }]
    @members = members.merge(@members)
  end

  def find(member)
    if member.is_a?(Member)
      key = member.name
    else
      key = member
    end
    @members[key.downcase]
  end
end

We could define a member object alongside.
class Member
  attr_reader :name, :gift

  def initialize(name)
    @name = name
  end

  def has_gift?
    !!@gift
  end

  def gift=(gift)
    raise if has_gift?
    @gift = gift
  end
end

and we could call that using:
members = ["Peter", "Alison", "John", "Maria"]
party = Party.new(members)
party.members.each { |m| m.gift = true }
party.find("Peter").gift = :foo

(Completely untested code, so you'll hopefully forgive the potential syntax error.)
In the above, Party is responsible for managing (and indexing) the list of members. Members, on its end, is responsible for checking if that member got a gift or not. To each his own properties, and assorted methods.
I could (should in fact) have used a Set object instead of a Hash in that Party object. Note how encapsulating this internal representation and never exposing it means you can later change it to a Set indeed, without any harmful effect for the rest of the code. The only change elsewhere would be the need to define how to hash a Member.

