If you're talking about the Minecraft inventory editor Invedit, then yes—it's completely legal. Many players use it without any issues. The only friendly advice is not to overdo it: spawning in so much stuff that the game loses its challenge can take the fun out of it. Used in moderation, it's a handy, legitimate tool.