I had seen an almost native-speaker of german saying that, I would like to know if that is grammar right. The original sentence is "Ich mag meinen Arsch zu rasieren"
Ich mag zu esse -> I like to eat
German Language Stack Exchange is a bilingual question and answer site for speakers of all levels who want to share and increase their knowledge of the German language. It's 100% free, no registration required.Sign up to join this community
There are lots of possible options with mögen.
Ich mag Essen/Pizza/deinen Bruder. (+ Akkusativ)
Ich mag (es), wenn die Sonne scheint. (+ Satz; es can be omitted)
Ich mag es, in der Sonne zu liegen. (+ Infinitivkonstruktion; es obligatory)
Ich mag nicht mehr laufen. (+ Infinitiv; only negative, meaning "keine Lust haben")
Das mag stimmen. (+ Infinitiv; meaning "möglich sein")
Your example is quite close to something based on the first option.
Ich brauch (et)was zu essen. / Ich brauch (et)was zum Essen.
"Ich brauche etwas, das man essen kann."
Note that the final -n of infinitives is dropped in certain dialects, so essen can become esse.
However, I find the sentence Ich mag was zu esse(n) (with the presumed meaning of "Ich hätte gern etwas zu essen") quite bad. It might acceptable in certain dialects, though.