A planet "just far enough away to not be pulled in" to the Sun will have a surface temperature of just under 5780K. There is no solid material made of atoms at that temperature. You would have a gas giant with a carbon (not carbon dioxide, carbon), silicate, and metal vapor atmosphere, and nothing is going to be living on that.
Asking "how close COULD they be to the sun while still existing" is basically the same as asking "what's the highest temperature at which life could exist?" Which is not a question that anyone can answer right now. If you want to know about Earth-like life, based on DNA and proteins dissolved in water and surrounded by lipids, then we can answer that--our biochemistry maxes out under 200C. And runaway greenhouse effects combined with the existence of high-pressure exotic phases of ice mean you can't actually have our kind of life on a planet with a surface that hot anyway. Probably the best you could do is have a desert planet with a thin atmosphere a smidge closer to the Sun than Venus.
But if you're looking for extremes, you probably didn't have our kind of life in mind in the first place. And then, well, we just don't know. The highest temperature aliens made of solid/liquid-state baryonic matter that I know of in commercially published fiction are the ones from Hal Clement's Iceworld, with body fluids based on molten copper chloride; they exist somewhere between 500 and 900 Celsius (I don't recall if a specific temperature was given in the book), and required solar concentrators to avoid freezing on the dayside of Mercury. That is incredibly speculative, but if you just want to copy Hal's idea and assume that they live at the upper end of the liquid range for copper chloride, you could have a planet about with an orbit about 0.773 times as big as Mercury's, or about 0.3AU.