Hi, I am an American Board Certified Neurologist with experience in diagnosing & treating all types of neurological & medical conditions including the concerns of spread of hepatitis you have mentioned here, and I am very glad to help you with your health concerns.
If the hepatitis is from needle use then it is either hepatitis B, or hepatitis C, or hepatitis D
These type of hepatitis are transmitted only by using contaminated needle, or sexual contact, or contact with body fluids like saliva, vaginal fluid, semen, or blood products etc
As long as you can prevent yourself from coming in to contact from the above situations you are fully safe
These hepatitis are not spread by just shaking hand or sharing food or drinks, or sitting with others, or talking to others etc
There are few other types of hepatitis like Hepatitis A or Hepatitis E and these are spread by oro-fecal route so these can spread if you use contaminated food or drinks or water etc
But if your guess is correct and the hepatitis they are having is from needle use then they are having Hepatitis B or C or D types, and these are not spread unless you share the contaminated needles or come into contact with blood or body fluids like saliva or vaginal fluid or semen etc as mentioned earlier. So if you can avoid these situations then you can safely attend the party and you are not expected to contract these types of hepatitis (Hepatitis B or C or D) from them.
Please let me know if you have any further questions, and please click a positive rating to credit for the time and effort put by me in answering your question.