For any graph $G$, a subset $D \subseteq V(G)$ is called a $P_3$-isolating set of $G$ if $G-N[D]$ contains no $P_3$ as a subgraph, that is, consists of isolated vertices and isolated edges only. The $P_3$-isolation number of $G$, denoted by $\iota(G,P_3)$, is the cardinality of a smallest $P_3$-isolating set of $G$. Zhang and Wu (2021) investigated the parameter $\iota(G,P_3)$ of a graph, and they proved that if $G \notin \{P_3,C_3,C_6\}$ is a connected graph of order $n$, then $\iota(G,P_3) \leq \frac{2}{7}n$. In this paper, we shall prove that if $G \notin \{P_3,C_7,C_{11}\}$ is a connected graph of order $n$ without triangles and induced 6-cycles, then $\iota(G,P_3) \leq \frac{n}{4}$, and the upper bound is sharp. This extends a result on $\iota(T,P_3)$ of a tree $T$ by Caro and Hansberg (2017).