That statement is False.
Technically speaking, socialism and communism would affect mostly the economic system in the country, not the governmental system.
So, a country could elect their officials through the democratic election and those officials could formulate either capitalist, socialist, or communist economic system on the legislation.