Tasker will not be able to mute the sound in time. It can only detect a message after it arrives, by which time the notification tone would already have been played. What you can do, however is to let Tasker take control of the notification tone. To do that, you must turn off the text message notification tone in the Android settings. Now you can create a profile in Tasker that detects that a message has arrived and plays the alert tone you want. Of course, you will now set up the necessary logic to skip playing the tone if the message body contains whatever content will identify the ones you want to ignore. BUT PLEASE NOTE: You will also have to include logic to
not play a tone when the phone is silenced or on Do Not Disturb, etc. so don't forget to do that.
I don't think Tasker can directly mark the message as read. I can't think of a workable way of doing that indirectly.