Yeah sounds like anal glands to me, which can technically be done at home during a bath, groomers usually do it when dogs come in for baths. But it is something you really should have your vet show you before you attempt cause if not done right can be kinda painful for the pup and might cause issues.
And just a warning up front, it is not a pleasant job, stinky, gross, and not for anyone that has a weak stomach. Most dogs express their own glands pretty easy when they poop, the pressure from the poop takes care of it, but some dogs need a little help once in awhile.
If he is having trouble with expressing them make sure you let his vet know, and if you don't want to do it see if the vet wants you to bring him in regularly to check and see if he needs it expressed, cause if left full to long it can cause the glands to impact on them, and that gets really painful and can be seriously unhealthy.