Technically, yes. But, this can cause issues in the long run.
Were you ever married to the father? If so, you probably want to get divorced and granted custody before leaving. If not, you're probably okay to move but you should check with a local attorney to get more information about potential issues you may not have thought about yet.