It's not possible to have different rules based on the placement of the recommendation slider, but you can use define context for the rule to differentiate the rules on PDP from the basket page. Please note that the context needs to be passed as a query parameter during search in the ruleContexts
search parameter for the Rule to be triggered. This would require some customization.