If it's someone else's project, and modified it, and it is an open source project that is available freely.. first check how that project is licensed. Most of the intellectual property can be used under "fair use" laws if you have used a portion (I don't know exact percentages) of someone's code and wrote the rest by yourself.
If you are going to sell a couple of them, it won't be a problem, but if you are trying to sell it legitimately in a wider market, even if it's 100% your code, talking to a lawyer is always the first thing you should do.
You can get free legal advice from https://www.avvo.com/
Good Luck!