It is simply a yellow popsicle that looks similar to SpongeBob, due to the fact that it has pores matching those of him and is shaped like him.
Role in episode
When the popsicle was first seen, Patrick says that he was getting closer to capturing the criminal and says that he could almost taste it. A close-up showed Patrick as if he was licking SpongeBob, though it was revealed that he was licking a yellow popsicle.
The Yellow Popsicle may be a reference to the popsicle with SpongeBob's face on it sold frequently in real life ice cream trucks/shops.