Are there any structure like "I would rather not to do something" which is valid ? I don't know why but it seems OK for me.
In English verbs, "to do" is implicit. Adding it with a verb would lead to two verbs in the same sentence serving essentially the same grammatical function. For example:
I would rather not fight
This makes perfect sense, with no need to specify that the verb is being done.
I would rather not to do fight
Both "do" and "fight" are verbs, making this redundant and incorrect.
There is a case where this structure might come up in English. That case is if the thing being done is not a verb, but rather a noun. In that case, an actual verb ("do") must be used. For example:
I would rather not to do Yoga
In this sentence, "do" becomes the verb.
However, "to do" would still sound awkward to most English speakers. It is not incorrect, but sounds overly formal. You might imagine it being said in Victorian times. Instead, most people would use "do" alone or some equivalent word.
I would rather not do Yoga
I would rather not perform Yoga
No, rather is used before a verb without to to express preference. So your sentence should be I would rather not do something, e.g. I would rather not sleep.
See all uses of rather here
"would rather" is followed by a bare infinitive as in "I would rather kiss a frog". There are variants: would rather do/not do, would sooner do, had rather do.