Both are right.
But in (b) the noun 'difference' is used as an uncountable noun, rather than a singular countable noun. You are right in thinking that you cannot use 'any' with this meaning before a singular countable noun in a question of this type. The singular countable version of this question would be 'Is there a difference?'.
When we say 'Is there any difference?' we are treating the word 'difference' as an abstract concept, so it is therefore uncountable. The answer might be 'No, there isn't much difference' or 'No, there is very little difference' or 'Yes, there is a great deal of difference'. As you can see from the use of the singular verb and the quantifiers 'much', 'many' and 'little', we are dealing with an uncountable noun here.
It is quite common to have two versions of the same sentence, one with 'Are there any ...?' and one with 'Is there any...?', where the second is an uncountable and more 'abstract' version of the first. Similar examples are:
Are there any benefits?
Is there any benefit?
Are there any advantages?
Is there any advantage?
I hope that helps.