It’s definitely possible, your trigger would be a Retweet of a given tweet.
Then the action taken would be to apply the specified role(s) on Discord.
The only thing you will need to do is somehow link (provide a relationship) between the users discord ID (?) and twitter handle