This is a very real possibility in organ transplantation and blood product transfusion. Here is a nice article about it. Cancer cells by definition are endlessly propagating cells of immortal lineage, so if they can get nutrients they will continue to divide.
The body has an "ID code" for determining self versus non-self called Human Leukocyte Antigen system. The closer a cells HLA is to the host, the less likely those cells will be targeted for an immune response. In transplantation or transfusion we are already trying to get as close as possible to the hosts HLA type to prevent rejection. It is very rare to have a perfect match, thus the need for immunosuppression in most transplants. This would hinder the hosts ability to mount an immune response to foreign cancer cells, even if it could recognize them as "not-self".
It is quite common for donor white cells (leukocytes) to survive in a transfused host (transfusion associated micro-chimerism). But rarely these white cells are a close enough match that they won't be destroyed by the host, but they WILL see the host as foreign, setting up what is called Graft versus Host Disease, where the transplanted white cells survive and proliferate in the host and attack the host, causing auto-immune-like diseases and possibly death. This isn't quite cancer, but is very similar. It also occurs with stem cell transplants and bone marrow grafts (especially in this case since the hosts entire bone marrow is killed, totally wiping out their immune system).
Cancer cells pre-existing within a closely HLA matched organ can do the same thing, thus any history of cancer is usually a permanent deferment for transplantation. There are also areas of the body that don't get a lot of blood flow (like joints), so the immune system has poor "visibility" of that area and any cancer cells introduced can proliferate for a while without triggering an immune response.
In your question, this applies to human to human transplantation, where it is possible for the HLA system to be closely matched. For animal to human usually the HLA analog is totally different and humans would easily reject any foreign tissue, but there are some animals with a very similar system (pigs for example, which is why porcine organs for human transplantation are early candidates for genetic modification).
For totally alien cancer cells, they may not express ANY surface antigens that a human immune system would even know how to recognize. So these would be considered a foreign body and generate a foreign body reaction (cancer cells engulfed by macrophages, the cancer gets walled off by fibrosis, much like shrapnel or tattoo pigment). But it is also possible that the alien cancer cells wouldn't generate ANY immune response whatsoever and could proliferate with ease until they blocked something critical that led to the death of the host.
But if you want to use cancer as an assassination tool, by far the easiest way is to expose the target to a highly carcinogenic substance that will cause them to develop their own cancer. But this can have a lengthy timeline and they may get successful treatment. The second option is to get closely HLA matched tumor cells from an aggressively growing metastatic cancer that has ineffective treatment, like malignant melanoma, and injecting them into the target. Metastatic cells are key because these tumor cells have "learned" how to survive as individual cells, land someplace and invade into tissue, and spread quickly. Even this will have a pretty slow course, probably months, but with the right cancer there can be little treatment and an unfortunate inevitability of death.
As an aside, transplant patients (and immunosuppressed patients in general) have a much higher risk of cancer because their immune system is unable to stop NATURALLY OCCURING CANCER. Our immune system zaps cancer cells regularly, but it only has to fail once.