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 is first seen, Patrick says that he is getting closer to capturing the criminal and that he could almost taste it. A close-up shows Patrick as if he were licking SpongeBob, though it is then 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.