You could probably do it with custom bbcode.
I haven't tried this but I have a working nofollow (works for staff) override that's similar:
AdminCP >> Editor Manager >> BB codes >> Custom BB codes
Select Add BBcode top right
BB code tag: dofollow
Title: Dofollow link
Replacement mode: Simple replacement
Supports option parameter: Yes
HTML replacement: <a href="{option}" rel="dofollow">{text}</a>
Example usage: [dofollow={option}]{text}[/dofollow]
where {option} is a valid URL and {text} is the anchor text.
Enabled: checked
Advanced options:
Within this BB code:
Disable smilies
Disable auto-linking
For nofollow, do the same but just use the word "nofollow" wherever you see "dofollow" above. I know that works because I have it set up on a forum I manage.