Actually I have found the solution - and that is to edit the WHERE clause within the second SELECT statement to allow the variable MaxPriorYear to have a leading colon. Heaven knows why I need this but it seems to be working.
DECLARE
MaxPriorYear NUMBER;
MaxPriorMonth NUMBER;
BEGIN
MaxPriorYear :=
(SELECT MAX(FISCAL_YEAR)
FROM TBL_MAIN);
MaxPriorMonth :=
(SELECT MAX(ACCOUNTING_PERIOD)
FROM TBL_MAIN
WHERE FISCAL_YEAR = :MaxPriorYear);
RETURN MaxPriorMonth;
END;