It is most definitely a hacked Pokemon. it can't do anything to your save file, so it's your choice what to do with it. You can keep it, release it, trade it away, etc. I usually wonder/surprise trade it away so that whoever gets it and doesn't understand that it's hacked can be a little happy about it. It's up to you