In this study, an allyltrifluoromethanesulfonyl imide ([C4H5O2F3NS]−) cation exchanger was synthesized to readily measure low molecular weight (LMW) aliphatic amines by potentiometric detection. The [C4H5O2F3NS]− was used to modify the glassy carbon electrodes (GCEs) of the potentiometer via electrochemical polymerization. The modified electrode was used to construct a potentiometric ion chromatography (IC) detector as well as trimethylamine (TMA)-specific molecularly imprinted membrane electrodes on a GCE surface using aniline as a functional monomer. When applied to river water, the relative deviation of the chosen LMW aliphatic amine concentration between the developed detector and a commercial conductivity detector provided with an IC column was less than 5.0%. Notably, the trimethylamine (TMA)-specific membrane electrode presented a linear potential response within the range of 0.01–1 µmol/L of TMA, and the TMA sensor was successfully used to determine TMA in human urine.