How common is it to work extra with one's professor after getting a M.S.?
Your concern that this is "risky" is somewhat vague, but generally, I'd say that working on something like this is extremely common. I've never "cleanly" finished a project, where it is fully wrapped up, with nothing else to do right as my degree was awarded, I moved to a new position, etc.

I'd say it's extremely common, and if you think that extra work might result in a publication, fairly valuable. There is the possibility of things being too demanding, but generally people are pretty understanding of other obligations that come up, especially if you let them know in advance.