Is there a way to retrieve discounts for a product in Craft Commerce v2?
This should do what you're looking for:

craft.commerce.discounts.getAllDiscounts()


craft.commerce.discounts is a reference to services/Discounts, so you've got access to all of the public methods in there, of which getAllDiscounts() is one.