A partial answer: cases of non uniqueness. 

Since $f$ is only defined a.e., we may identify $0$ and $1$ and pose the problem in $\mathbb{R}/\mathbb{Z}$, which we may identify with $[0,1)$ as a measure space. If we denote  $\tau$ the translation $x\mapsto x-r\mod 1$, and define $\alpha:=-\frac c d\chi_{[0,r)}-\frac ab\chi_{[r,1)}$ the conditions can be rewritten as a fixed point equation: $f(x)=\alpha(x)f(\tau(x))$ (a.e.).

Now assume $r$ is rational, thus $r=\frac kn$ with $0<k<n$ and $(k,n)=1$.
 Then the $n$ intervals $I_j:=\tau^j([0,\frac1n))$, $0\le j<n$  are a partition   of   $[0,1)$, $k$ of which are included in $[0,r)$, the other $n-k$ being included in $[r,1)$. 

If we define freely $f$in the interval $[0,\frac1n)$ the equation determines it uniquely on $[0,1)$, with a compatibility condition, namely
$f(x)=\Big[\prod_{0\le j<n}\alpha(\tau^j(x))\Big]f(x).$ 
Note that for any $x\in[0,1)$ the $n$ iterates $\{\tau^j(x)\}_{0\le j<n}$ are a choice of representatives for the mentioned partition, so the compatibility conditions writes 
$$\Big(-\frac cd\Big)^k\Big(-\frac ab\Big)^{n-k}=1,$$
so we have a closed infinite dimensional linear space of solutions, or no nonzero solutions, according whether this condition holds or does not.