In my naive understanding, a neuron was inhibitory or excitatory depending on the neurotransmitter it releases onto its postsynaptic partners.
This is mostly correct. What remains a question is what makes a given neurotransmitter inhibitory or excitatory. To some extent, that depends on the post-synaptic receptors, but also depends on other conditions: one case mentioned in the linked Q&A that I'll repeat is that GABA is actually excitatory at some times, including during development (and the same thing can happen in certain causes of epilepsy). In that case, the reason is because GABA-A receptors are chloride channels, so the reversal potential for chloride is what matters. If the reversal potential for chloride is more hyperpolarized than threshold, GABA-A is an inhibitory receptor; if the reversal potential for chloride is more depolarized than threshold, GABA-A is an excitatory receptor. Chloride ion concentrations are different during certain stages of development so the role of GABA changes (in development it seems like it is important for development of eventually inhibitory circuitry).
I digress a bit, but I think you've really already encountered all you need to know: labels like "excitatory" and "inhibitory" for a neurotransmitter itself are generalizations that satisfy human preferences for heuristics. It's convenient to talk about GABA as an inhibitory neurotransmitter, because in most cases the major systemic effect of GABA is inhibition. Same with glutamate in the direction of excitation.
Most of the inhibition caused by glutamate is the presynaptic inhibition type discussed in a previous Q&A; that is, it is suppressing the release of glutamate itself. In that sense, glutamatergic inhibition is only as effective as glutamatergic excitation is: the net effect of glutamate will always be excitatory in that system.
Therefore, it is straightforward to consider GABAergic and glutamatergic cells inhibitory and excitatory, respectively.
how can we be sure that the presynaptic's cells action are not mediated by other cells, and the observed inhibition/excitation is not rather a network effect?
The principle way is by pairwise recordings: you record from the presynaptic and postsynaptic cell at the same time, activate the presynaptic cell, and measure the voltage in the postsynaptic cell. These sorts of pairwise recordings are a common tool in neuroscience.
Cancedda, L., Fiumelli, H., Chen, K., & Poo, M. M. (2007). Excitatory GABA action is essential for morphological maturation of cortical neurons in vivo. Journal of Neuroscience, 27(19), 5224-5235.
Owens, D. F., Boyce, L. H., Davis, M. B., & Kriegstein, A. R. (1996). Excitatory GABA responses in embryonic and neonatal cortical slices demonstrated by gramicidin perforated-patch recordings and calcium imaging. Journal of Neuroscience, 16(20), 6414-6423.
Thomson, A. M., & Deuchars, J. (1997). Synaptic interactions in neocortical local circuits: dual intracellular recordings in vitro. Cerebral cortex (New York, NY: 1991), 7(6), 510-522.