We study the mixed ’t Hooft anomaly of the subsystem symmetries in the exotic BF theory and the foliated BF theory in 2+1 dimensions, both of which are fractonic quantum field theories describing the equivalent physics. In the anomaly inflow mechanism, the ’t Hooft anomaly of the subsystem symmetries can be canceled by combining a subsystem symmetry-protected topological (SSPT) phase in one dimension higher. In this work, we construct the exotic and foliated BF theories with background gauge fields, and the exotic and foliated forms of the SSPT phases using the foliated-exotic duality. In the foliated form, we see that the non-topological defect that describes a fracton can be viewed as a symmetry-like operator. We also newly construct the foliated and exotic SSPT phases with different foliation structures via the foliated-exotic duality. We can show that the SSPT phases with different foliation structures cancel the same anomaly. This may provide a clue to the characterization of the ’t Hooft anomaly of subsystem symmetries.