It's actually bannable to have such an item. I suggest throwing it out and if you have screenshots, report the player who sold it to you.
Yes, as Elrak said, it is bannable and if you sell it/give it to others, you may get banned. So just hand it over to a Moderator/try to destroy it by despawning it through ClearEntities, etc. @SSMH would you like to assist?