Yes, is possibile to hide as many payment methods as you want if the cart contains some product.
To hide payment methods if a product is in the cart, select the criteria "Cart Contains" and then select the product or the variants:
Note: At the moment you can select one product per rule, but you can choose more than one product variants (for the same product)