It's likely that "for example" is the correct phrase in this case, and is a widely used idiom in English, but it depends on what you want to say.
If you want to provide an example right then and there, you need to say "For example" or - if you really want to use the article - you could say "As an example" or "An example might be", or any such construct. A sample sentence might be:
For example, one way to clean silver coins is to wash them with water.
Note that in such a case, you can't use the plural: *"For examples, ways to clean coins include water and baking soda" would be wrong.
However, there are also situations in which using "for an example" would be perfectly acceptable and, in fact, the only correct thing to write:
For an example of how to clean silver coins, refer to this book.
Note that the phrase "for an example" here is used differently than "for example" in the previous sentence. Instead of specifically providing an example, the speaker is only telling people where they can find that example. And, in such a case, you should definitely use the "an" article.
Note that here, you can use the plural: *"For examples of how to clean coins, refer to this book" would imply that the book contains many examples, not just a single one.
Looking back at your example sentences, here is how both of your sentences could be continued:
Knowing the weather will help you prepare your clothes, as well as plan your commute. For an example of how to dress appropriately, you may wish to look at photographs of locals taken in the season you will be travelling.
Knowing the weather will help you prepare your clothes, as well as plan your commute. For example, if you are travelling to Warsaw in November, you should definitely pack a raincoat, as Poland is very rainy then.