Realizing anomalous anyonic symmetries at the surfaces of three-dimensional gauge theories