It appears the questioner wants to know if HIV can be genetically altered to attack other "foreign" HIV viruses and to protect the body. My answer is: probably not.
HIV is a highly mutable (changeable) virus whose existence depends upon its ability to survive and replicate. If it were altered to perform other functions it would be at the expense of this primary function, so, because of it's mutability it would eventually drop or lose these abilities and become genetically just like every other HIV.
That is why HIV vaccinologists focus on using parts of the virus to stimulate the human immune response to recognize the presence of the virus early in infection when few viruses are replicating. It is thought that if the virus can be recognized at that point then it can be stopped. However the problem is that the virus has so many variant forms that the immune system cannot be "educated" to recognize them all, so that is why a vaccine is so difficult to develop.
These days, to solve the HIV/AIDS problem, the best thing to do is to find everyone who is infected and treat them with antiviral drugs that will suppress viral loads. That in turn will reduce the ability of an HIV+ person to infect another person. It is felt that if everyone who is infected (or at least the majority) is treated, then viral transmission could be prevented, and the epidemic could be stopped. That is how we could stop HIV with the tools we already have.
[Editor: much work is already being done on HIV vaccines. Here's the Wikipedia entry on HIV Vaccines.]