Yes, it can happen. If you are wiring a switch loop, you'll have to connect the white wire to the black wire. Hence, the white wire becomes a hot wire. Also, some electricians might use a white wire instead of the black wire by mistake. So, in such situations, both black and white wires are hot. First, check the polarity of the wires and confirm this issue. Then, take the necessary action.