If you are infected with a virus or disease the cells would attack your body. Is there away to take a cell and modify it to attack itself?

The body's immune system is very good at detecting foreign proteins (bacterial or viral) and mounts an immune response to try and remove them. Immunisation can boost that process as can some drugs. Recently scientists are trying to do what you suggest - especially for some cancers. Google is a good place to starts researching this topic in more details.