In general, RNA and DNA migrate differently in gels, so you need your ladder to be of the same kind of the sample (RNA ladder for RNA samples and DNA for DNA).
When you do a gel electrophoresis, the ladder marker has to be specific for each type of acid nucleic. So you have to use a different ladder marker for RNA and DNA. That's because RNA and DNA don't migrate the same way in gel, so if you don't use a specific ladder marker, your final electrophoresis results may be wrong.