All our reasoning, logic, deductions, Science, Philosophy, eureka moments, Aha! moments, etc. are based on a feeling of confidence that we are "thinking correctly", we are "reasoning correctly", we are following "logical steps". But how do you know that? Well, you claim "I remember (memory) that I just had a sound, logical reasoning and now I feel confident about it". But, how do you fundamentally know that you really had a valid, sound, logical reasoning? Because you remember you did so? What if your memory is flawed or manipulated? Your feeling of confidence? What if an evil genius is making you feel like that? How can you be so sure that your thoughts are trustworthy? Can you really trust your inner dialogue? Can you really trust natural language? In fact, how do you even know that you can understand this question I'm just typing right know? Because you are experiencing a feeling of understanding in your conscious awareness? What if that feeling is just an illusion as well?
The feeling of having a rational thought is an emotion. It is confidence itself.
Like any other emotion it can be shaped incorrectly by biology or experience. But that does not make it an illusion unless it is wrong.
If it were wrong as a matter of course, most of the time, we would have died out as a species long ago. But of course, faith that we have not died out, and that you are actually here with other humans requires confidence in sensory information.
You can have confidence in your thoughts because you simply do. Even if you lack confidence in your thoughts, you have confidence in your lack of confidence. This is the basic fact of Existentialism: that we have an authentic experience of knowing what we know, and that arguing with it is nonsense because we are doomed to believe it anyway.
We can shape and train our sense of confidence, like most of the rest of our emotional responses, through exercise and experience. But it will not go away, and doubting it absolutely, instead of playing with it and developing it, is just evading responsibility for taking care of it properly.
The two questions posed in the title of your post would be equally at home in a psychology forum. In fact, psychology is a great thing for a philosophy student to study on the side.
The answer to your first question is YES. What you think is a rational thought could be based on propaganda you have unwittingly stored in your mind, a misunderstanding of scientific principals, a cognitive bias, etc.
The partial answer to your second question begins with understanding and accepting your limitations. If you believe something (A), ask other people what they believe about A. If their beliefs are different than yours, try to pick apart their arguments to see if they hold water.
Warning: "Peer review" can itself be deceptive. Many so-called peer-reviewed journals are nothing more than propaganda rags. So it helps to solicit opinions from several people and make sure you analyze their opinions to make sure they're logical.
You can sometimes rely on your senses and powers of observation. If you think the economy isn't so bad because the media says it's not so bad, and "Hey, it's gonna get much better!," then just look at your paycheck and benefits, as well as your overall standard of living. If you're surrounded by a growing population of homeless people, you might start questioning the media.
Unfortunately, many philosophical questions are beyond the scope of science, the senses, etc.
Just for fun, you should post your question on a psychology forum and see what kind of answers you get. If you do, please share the link; I'm curious to see the responses.