Jokes aside, Ian's raising an important point. Good Scrum Masters may simultaneously be acting as agile coaches or consultants.
Alternatively, such a Scrum Master, may also work with others who have the necessary skills, to address certain challenges.
I don't believe there's a universally accepted definition of job titles containing the word "agile", so I would encourage obtaining clarity about expectations, constraints and responsibilities, before appointing someone or accepting such work.
I would say that in general, even if the brief of an agile coach or consultant might not relate to Scrum, the same traits that make for a good Scrum Master will be vital.