Given Madrid’s refusal to help against Iran, U.S. laws dealing with boycotts of Israel could impose economic costs.