But, thinking about the flow sensor his output can be only GND or VCC
But there you are making an assumption that may not be reality. Output signals from some sensors sometimes use what is called an open collector (or open drain) output signal. That is a transistor that will pull the signal to ground in one state (low) but just disconnect on the other (high) state. Such a signal requires a pull-up resistor to the Vcc voltage of the input pin the signal is being wired to. In the case of an Arduino input pin, one can simple enable the internal pull-up resistor to satify the requirement.
So without detail from a datasheet showing if the signal is a open-collector output or not, I would recommend you do use a pull-up, it will do no harm and may not work without one.