Myanmar is a beautiful country. It is rich in natural resources.
If I rewrite this sentence as
Myanmar is not only a beautiful country but also rich in natural resources.
Will it be grammatically correct? And does the given sentence make sense?
That's fine and makes sense. Putting in a comma after the first attribute ("beautiful country") is discretionary and not usually necessary (or desirable) unless the sentence is very long or you really want to emphasize the separateness of the two things, for instance when the spoken sentence might include a dramatic pause after the first item. ("This is not only a top quality shirt, but also very affordable!")
It is correct and makes sense, but you'd use this form only if you were confronting the idea that Myanmar is beautiful but doesn't have other positive attributes.
Since this seems unlikely for any context, I'd suggest avoiding this form and more directly write about the positive attributes of Myanmar without this unnecessary negative form.
Myanmar is not only a beautiful country but also rich in natural resources.
I think your sentence is not ungrammatical; however, but also causes it to sound a tad "marginal" to my ear. Here is the version that sounds truly idiomatic to my ear:
Myanmar is not only a beautiful country but a land rich in natural resources.
That's because for me the pattern is not only X but also Y when X and Y are not identical constructions, but different constructions, such as a noun phrase versus a phrase headed by an adjective.
When the parallelism involves different kinds of phrases, it is better to omit also:
Myanmar is not only a beautiful country but rich in natural resources.
When the phrases are of the same kind, but also sounds idiomatic to my ear, though it can be omitted:
She is not only a fast swimmer but (also) a volunteer fire fighter.
Myanmar is not only a beautiful place to visit but (also) a country with bustling seaports.
They were not only trespassing but (also) dumping toxic waste.
Yes it is correct.
It can also be written as:
Not only is Myanmar a beautiful country but also rich in natural resources.