This is a question that has two answers, depending on what is meant by “to sell my invention.”
If by “sell my invention” you mean sell a product that embodies your invention, then the answer is no, you do not need a patent. As discussed in my answers to what is a patent and what rights will a patent give to me, a patent does not grant you the affirmative right to make, use and sell your invention. Rather, a patent is an exclusionary right to prevent others from making, using and selling your invention. It is entirely possible to have a patent for your invention and yet not be able to make, use and sell your invention without infringing another patent owner’s rights. For this reason, whenever you are producing a new product, it is important to think both about (1) protecting your intellectual property by filing for appropriate patent claims and (2) not infringing other patents by having your patent attorney prepare a freedom to practice opinion based on a patent clearance search.
On the other hand, if by “sell your invention” you mean sell the intellectual property rights associated with your invention, then the answer is often yes, you do need patent rights. In many cases, the patent is the most valuable and tangible asset related to the invention that a patent owner has to license or sell. Further, without patent rights, you do not have the right to exclude others from making, using or selling your invention. Accordingly, without patent rights, when your invention becomes publicly known, there is no legal protection to prevent others from bypassing you and simply making, using or selling your invention themselves. In these cases, the patent is the asset that generates income and without one it may be difficult to sell your invention.