Yes. Federal law allows credit unions to charge non-interest charges and fees, including dormant / inactive account fees.
Credit unions are required to disclose any fees associated with their deposit accounts to you when the account is established. You may want to review your account agreement with the credit union as well as the current fee schedule. The credit union will notify you of changes or increases in fees prior to their effective date. Credit unions usually publish changes and increases in fees in the credit union’s branches, your statement, a separate written notice, and/or by posting on the credit union’s website.