This is a fairly common question. The short answer is "Yes." The longer answer is "Yes, but ..."
There is an HIV prevention technique called post-exposure prophylaxis, or PEP, for persons who believe they have been exposed to HIV. PEP was developed for health care personnel potentially exposed through their work. However, two solid studies of individuals with probable exposure through risky sex or drug needle sharing demonstrate a high degree of effectiveness in preventing HIV in nonoccupational incidents, too.
PEP consists of 30 days of an anti-HIV "drug cocktail." The standard uses Combivir (AZT/zidovudine combined with 3TC/lamivudine) taken twice daily. Other combinations may be required if the source's resistance profile is known.
The biggest "but" with PEP is that it should be started within 72 hours of the incident. Another is that insurance is not likely to pay for PEP, so it will probably cost hundreds of dollars. Medication side-effects are likely, especially flu-like symptoms. This usually goes away after several weeks about the time PEP is finished!
Of course, all this is better than having AIDS. Any doctor (or the Brackenridge emergency room) can prescribe PEP; the guidelines can be found at www.cdc.gov/epo/mmwr/preview/mmwrhtml/00054952.htm. Excellent info about PEP can also be fund at www.aidsinfonet.org, fact sheet No. 156.
Major caveat: Someone knowledgeable should assist the individual in assessing the real level of exposure risk. Most callers I talk to are needlessly anxious; they typically do not have significant risk but they don't know that. PEP must be taken very seriously and should never be prescribed routinely.
But, yes, there is something that can be done.