Is it true that the types of hpv that cause genital or anal warts, can't cause cancer in anal or penis or cervix?

Yes. There are dozens of strains of HPV and each are specific for the type of location they are found and the behavior they have. There are 7 strains with confirmed association with cancer & none of these produce genital warts. Of the 2 main and 2 alternative strains that produce genital warts none are associated with cancer. You can acquire the cancer strains the same way, but they do not act the same.