The answer to your question is sometimes.
When 'I mean' is used to emphasize a statement or when you are unsure of what to say or how to say it, I wouldn't substitute 'rather.'
When 'I mean' is used to introduce a statement that corrects what you have just said I would use 'rather' interchangeably.
I wouldn't use 'I mean' to introduce a statement that indicates what is true after you have said what is not true -- at least not in statements you given
Others may not agree so I hope you get some further comments.