As has been mentioned, ##\int f## is not a single function but an equivalence class of functions. To make this explicit, I'll denote this set as ##[\int f]##. If a function F is an element of ##[\int f]##, we mean that ##F' = f##.
When we say that ##\int cf = c \int f##, we mean that the set ##[\int cf]## and the set ##c[\int f]## are equal. The first set is easy enough to understand: if F is in the set ##[\int cf]##, then ##F'(x) = (cf)(x)## for all x. But what does ##c[\int f]##, a scalar multiplying a set, mean? Your example posits if ##F \in c[\int f]##, then ##F = c\cdot G## where ##G## is some element of ##[\int f]##. It follows then that ##c=0## implies ##F=0##. This leads to the contradiction you noted, so it's not the right interpretation if we want the notation to make sense. If instead we say that if F is an element of ##c[\int f]##, we mean that ##F'(x) = c\cdot f(x)## for all x, there's no problem. If ##c=0##, we have ##F' = 0##, which implies F is constant. Moreover, since ##(cf)(x) = c\cdot f(x)##, it's clear the two sets are equal for any value of c.
If you're familiar with solving differential equations, you can look at it this way as well: Differentiating ##F = \int cf## or ##F = c \int f## yields the same differential equation F' = cf. The general solution to this differential equation consists of a homogeneous part, which is the solution to F'=0, plus a particular solution Fp where F'p = cf. If ##c=0##, you lose the particular solution, but you're still left with the homogeneous solution, which is the constant of integration. In other words, the constant ##c## doesn't affect the constant of integration.