Let's say that someone uses a needle which has some old blood infected with HIV. In this case, is it possible for them to get infected with HIV?
Yes, you can transmit HIV with infected needles/syringes. This is a quite common mechanism of transmission when drug addicts share and re-use needles and syringes and also in third world hospitals with poor hygiene standards.
A drop of blood is considered infectious at least until it has completely dried up (some research showed that it might be contagious for up to 5 days longer when the conditions are right, see reference 1 below). Mostly HIV is senstive against high temperatures (over 60°C), while it is stable at low temperatures. It is very sensitive against shifts in pH (below 7 or above 8) and also against desinfectants like bleach. Have a look at the references below, a lot of research has been done by Abdala et al. in this field. You can find his whole reference list here (it contains more articles in this field).