A general rule of thumb is that if you do not own 100% of the content* used, you can not use it in anything commercial (unless you know the appropriate owner well/can have the owner act as if they know you well via compensation ). Heck, technically using them in nonprofit fanworks is illegal too but nobody really cares enough to enforce that unless their name is Square Enix.
* This not only means the sprites/music themselves but also the ideas behind them. It's what makes the distinction between a fan character ("original" character) and a truly original character with no ties to an existing Intellectual Property. It's why Nintendo can't just plop Crash Bandicoot into a Mario game, or why Sony can't have a game featuring Yoshi. They don't own the idea, even if they made the sprites/models entirely from scratch. It'd be even worse if [Sony] simply tried plagiarizing sprites from SMW2: Yoshi's Island.
* This not only means the sprites/music themselves but also the ideas behind them. It's what makes the distinction between a fan character ("original" character) and a truly original character with no ties to an existing Intellectual Property. It's why Nintendo can't just plop Crash Bandicoot into a Mario game, or why Sony can't have a game featuring Yoshi. They don't own the idea, even if they made the sprites/models entirely from scratch. It'd be even worse if [Sony] simply tried plagiarizing sprites from SMW2: Yoshi's Island.