Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:
I could not raise the issue with your snippet, even in a .sql file.
However, I was able to raise plsql:S1172 in both a .sql and .pkb files with the following snippet:
CREATE PROCEDURE say_hello(name VARCHAR2) AS
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello World');
END;
/
We don’t expect the procedure declaration to be in a package body.
Then, the issue is not about .pkb files not being analyzed.
It is a false negative.