2004 Mazda 6 engine question

One of the wheels that the serpentine belt is on has some rubber extruding from it that isn’t part of the belt.



If you look down, it’s the second wheel from the front on the bottom.



What is this connected to, and what will it cost to repair? How difficult would it be to do myself? It looks like the whole engine may have to come out, but I hope not.