This is partially true. Economics originated in the field of political economy, which was at the time for lack of a better word, bourgeois. The political economists existed in a sense only to advise the government and monarchies on economic policy. When Marx set out to critique this field in his magnum opus which took thirty years of study to complete, Capital, he criticised them of obsessing over superficialities and only observing appearance rather than to drop down to the essences of capitalism.
In this sense, economics is inherently political and ideological, its anathema is Marxism which is a critique of this political and ideological field, but not a substitute of its own. It is not an economic theory, nor a political economic theory, it is a method of critique which is anti-ideological.