It seems that shortly before the attack American ship sunk small (spy?) Japanese submarine not far from Pearl Harbor with depth charges. Was that normal reaction before the war around navy bases?
Only one of the three submarines engaged that day (two others were lost without entering the AO) was sunk before the attack, that by the USS Ward at 6:45am, about an hour before the raid. I presume that's the one you're talking about. Ward was responding to reports of a periscope, so was at alert. Some useful information (if pro forma) comes from the Ward's own report, available here.
The heightened tension meant that the area of Pear Harbor, and several miles out, which was already part of a Restricted Zone had become a Defensive Sea Area where unidentified vessels were subject to attack. The submarine was clearly within the confines, and the Ward engaged upon spotting the submarine clearly attempting to trail another ship to infiltrate the inner portions of the harbor. Their voice report, succinctly, was "We have attacked, fired upon, and dropped depth charges on a submarine operating in defensive sea areas." In their report they do not identify the submarine as Japanese, only as unidentified.
As a harbor with a potentially blockable channel, policy to engage and destroy any potential threats--especially given the existing hostilities in the Atlantic, which saw the US involved since at least June 1941 in convoy action--was especially important for Pearl. US code 33 U.S.C. 475 empowered the Secretary of the Navy (from 1912 on) to act in appropriate manner to enforce regulations to protect the harbor. Executive Order 8143 of 26 May 1939, referenced in the US Navy Regulations volume eff. 1941 (p.485) indicated further that it had been designated a Defensive Sea Area specifically--not merely restricted--and closed to all non-Navy traffic excluding 'public vessels of the United States' and persons aboard them:
The area of water in Pearl Harbor, Island of Oahu, Territory of Hawaii, lying between extreme high-water mark and the sea, and in and about the entrance channel to said harbor, within an area bounded by the extreme high-water mark, a line bearing S from the SW corner of the Puuloa Naval Reservation, a line bearing S from Ahua Point, and a line bearing W from a point 3 miles due S from Ahua Point, has been established as a defensive sea area for purposes of national defense, and no persons (other than persons on public vessels of the United States) are permitted to enter this defensive sea area, and no vessels or other craft (other than public vessels of the United States) are permitted to navigate in this area, except by authority of the Secretary of the Navy.
In such a situation, an unidentified potentially military craft behaving suspiciously was absolutely a threat, and Ward had the freedom, if not the specific order, to engage such a vessel in the defensive zone. Insofar as this happened, it was 'normal' for December 1941, but we don't have many additional data points if any until after the attack began. Any defensive sea area so declared by 1941 would presumably be similar in terms of operational flexibility, if the order establishing it were worded this way.