Is it OK to borrow a ground wire from a different circuit?
Yes, in most jurisdictions.



NEC 2014

The 2014 version of NEC has made a change to 250.130(C), which now allows you to connect to the equipment grounding conductor of another branch circuit, as long as it originates from the same enclosure. The new text reads as follows:


  National Electrical Code 2014
  
  Article 250 - Grounding and Bonding
  
  VII. Methods of Equipment Grounding
  
  250.130 Equipment Grounding Conductor Connections. Equipment grounding conductor connections at the source of separately derived
  systems shall be made in accordance with 250.30(A)(1). Equipment
  grounding conductor connections at service equipment shall be made as
  indicated in 250.130(A) or (B). For replacement of non–grounding-type
  receptacles with grounding-type receptacles and for branch-circuit
  extensions only in existing installations that do not have an
  equipment grounding conductor in the branch circuit, connections shall
  be permitted as indicated in 250.130(C).
  
  (C) Nongrounding Receptacle Replacement or Branch Circuit Extensions. The equipment grounding conductor of a grounding-type
  receptacle or a branch-circuit extension shall be permitted to be
  connected to any of the following:
  (1) Any accessible point on the grounding electrode system as described in 250.50
  (2) Any accessible point on the grounding electrode conductor
  (3) The equipment grounding terminal bar within the enclosure where the branch circuit for the receptacle or branch circuit originates
  (4) To an equipment grounding conductor that is part of another branch circuit that originates from the enclosure where the branch circuit for the receptacle or branch circuit originates
  (5) For grounded systems, the grounded service conductor within the service equipment enclosure.
  (6) For ungrounded systems, the grounding terminal bar within the service equipment enclosure


So if your area has adopted NEC 2014, you can connect a grounding conductor to the grounding conductor from another branch circuit, as long as both circuits originate from the same panel. 



NEC 2011

Depending on what code has been adopted in your area, you may not be able to borrow the grounding conductor from another circuit.

Here is what NEC 2011 has to say about replacing receptacles with no equipment ground.


  National Electrical Code 2011
  
  Article 250 - Grounding and Bonding
  
  VII. Methods of Equipment Grounding
  
  250.130 Equipment Grounding Conductor Connections. Equipment grounding conductor connections at the source of separately derived
  systems shall be made in accordance with 250.30(A)(1). Equipment
  grounding conductor connections at service equipment shall be made as
  indicated in 250.130(A) or (B). For replacement of non–grounding-type
  receptacles with grounding-type receptacles and for branch-circuit
  extensions only in existing installations that do not have an
  equipment grounding conductor in the branch circuit, connections shall
  be permitted as indicated in 250.130(C).
  
  (C) Nongrounding Receptacle Replacement or Branch Circuit Extensions. The equipment grounding conductor of a grounding-type
  receptacle or a branch-circuit extension shall be permitted to be
  connected to any of the following:
  (1) Any accessible point on the grounding electrode system as described in 250.50
  (2) Any accessible point on the grounding electrode conductor
  (3) The equipment grounding terminal bar within the enclosure where the branch circuit for the receptacle or branch circuit originates
  (4) For grounded systems, the grounded service conductor within the service equipment enclosure.
  (5) For ungrounded systems, the grounding terminal bar within the service equipment enclosure


Which means you can add a grounding conductor, but only at or before the service panel. 

NOTE:
The grounding electrode system (of which the grounding electrode is a part), dose NOT include branch circuit equipment grounding conductors. The grounding electrode system is a collection of conductors used to connect the service equipment to earth, and is typically located at or near the service entrance only. 

More from the NEC


  National Electrical Code 2011
  
  Article 406 - Receptacles, Cord Connectors, and Attachment Plugs (Caps)
  
  406.4 General Installation Requirements. Receptacle outlets shall be located in branch circuits in accordance with Part III of Article
  210. General installation requirements shall be in accordance with 406.4(A) through (F).
  
  (C) Methods of Grounding. The equipment grounding conductor contacts of receptacles and cord connectors shall be grounded by
  connection to the equipment grounding conductor of the circuit
  supplying the receptacle or cord connector.
  
  (D) Replacements. Replacement of receptacles shall comply with 406.4(D)(1) through (D)(6) as applicable. Arc-fault circuit-interrupter and ground-fault circuit-interrupter type receptacles shall be installed in a readily accessible location.
  
  (1) Grounding-Type Receptacles. Where a grounding means exists in the receptacle enclosure or an equipment grounding conductor is
  installed in accordance with 250.130(C), grounding-type receptacles
  shall be used and shall be connected to the equipment grounding
  conductor in accordance with 406.4(C) or 250.130(C).  \
  
  (2) Non–Grounding-Type Receptacles. Where attachment to an equipment grounding conductor does not exist in the receptacle
  enclosure, the installation shall comply with (D)(2)(a), (D)(2)(b), or
  (D)(2)(c).  
  
  (a) A non–grounding-type receptacle(s) shall be permitted to be replaced with another non–grounding-type receptacle( s).
  
  (b) A non–grounding-type receptacle(s) shall be permitted to be replaced with a ground-fault circuit interrupter type of receptacle(s).
  These receptacles shall be marked “No Equipment Ground.” An equipment
  grounding conductor shall not be connected from the ground-fault
  circuit interrupter type receptacle to any outlet supplied from the
  ground-fault circuit-interrupter receptacle.  
  
  (c) A non–grounding-type receptacle(s) shall be permitted to be replaced with a grounding-type receptacle(s) where supplied through a
  ground-fault circuit interrupter. Grounding-type receptacles supplied
  through the groundfault circuit interrupter shall be marked “GFCI
  Protected” and “No Equipment Ground.” An equipment grounding conductor
  shall not be connected between the grounding type receptacles. 
  
  (3) Ground-Fault Circuit Interrupters. Ground-fault circuit-interrupter protected receptacles shall be provided where
  replacements are made at receptacle outlets that are required to be so
  protected elsewhere in this Code.  
  
  (4) Arc-Fault Circuit-Interrupter Protection. Where a receptacle outlet is supplied by a branch circuit that requires arc-fault circuit interrupter protection as specified elsewhere in this Code, a replacement receptacle at this outlet shall be one of the following:
  (1) A listed outlet branch circuit type arc-fault circuit interrupter
  receptacle.
  (2) A receptacle protected by a listed outlet branch circuit
  type arc-fault circuit interrupter type receptacle.
  (3) A receptacle protected by a listed combination type
  arc-fault circuit interrupter type circuit breaker
  
  (5) Tamper-Resistant Receptacles. Listed tamper resistant receptacles shall be provided where replacements are made at receptacle outlets that are required to be tamper-resistant elsewhere in this Code.
  
  (6) Weather-Resistant Receptacles. Weather-resistant receptacles shall be provided where replacements are made at receptacle outlets that are required to be so protected elsewhere in this Code.


There's a good YouTube video, where Mike Holt explains the options for Replacing two-wire receptacles



Consult your local government and/or a licensed electrician, to determine which version of code is used in your area. Codes do change, and you'll always have to follow the code adopted in your area.