Branes in \(N=2,\, D=4\) supergravity and the conformal field theory limit. Instanton partition functions in \(\mathcal{N} = 2\) SU(\(N\)) gauge theories with a general surface operator, and their \(\mathcal{W}\)-algebra duals 