With most celestial bodies above a certain size limit, you can safely assume they only become more and more dense the closer you get to the center. This is true for most planets and it's definitely true for the Sun.
But the aggregation state (solid, liquid, gas) does not matter for the spin (I believe that's what you mean by "self-rotation"). If it's spinning, then it's spinning, no matter what it's made of.
What keeps the Sun in one piece is only its gravity, nothing else. The various parts of the Sun are compressed together by the overall gravity of this object. Spin doesn't matter here.
Spin would matter if the Sun was spinning incredibly fast. But that's not the case, it's not even close; it would have to spin by orders of magnitude faster in order to break up because of that. Like, thousands of times faster, I'm not even sure what the number is but it's huge.
Finally, aggregation states are not very important at cosmic scales. Planets like the Earth are technically "solid", but they behave more like fluids, or more like piles of sand, during an impact. Also, the "solid" parts of the Earth actually do flow like liquids over many millions of years. There are no clearly defined rules here.