No.
Actually, that is "forbidden" by international law. NO ONE can "own" another natural cosmic object like a star or a planet, or claim a piece of the moon. The idea of planting a flag actually means NOTHING.
These website that allow you to "buy" a star or name a star after your BFF this month are only a little bit better than hoaxes. MOST of them will tell you, if you ask them directly, that you are not actually buying the star, and that the name you give it is ONLY on a piece of paper that they print using a laser printer in the office. They will explain to you that you are buying a "novelty gift" (sometimes called a "gag gift", and that your purchase offers NO legality of any kind.
I;ve seen one website that claims "You name will be recorded in the Library of Congress!" BFD! Almost every book in the United States is in the Library of Congress! In truth, this means nothing.
Of course, any group which tells you that this is all true, that you actually OWN something, or that you can make a legal claim against it IS LYING TO YOU, and you need to avoid them completely.
SO, knowing all this is really a hoax, I'll admit that it IS a cute idea -- if you're 15-year-old lovesick teenager. So, if you WANT to spend your money this way -- go ahead. it is NOT illegal, and so long as you understand it is a HOAX, then have fun.
As a note, the ONLY ones who can truly NAME a star or planet or comet is the International Astronomical Union (IAU) -- the same people who declared that Pluto is no longer a planet. THEY keep all the necessary records, and the very rarely take suggestion. Instead, they use a numbering system that is based on either the date or year of the new objects discovery. personal names are very rarely used, but Comets are sometimes named after the people whop found them, like Halle-Bopp that crashed into Jupiter