Your question isn't clear to me. You seem to be having an issue with rsync, but it's not quite clear what it is - except that it's not doing what you expected it to do. I'm not sure how to answer except to cover some basics:
1. Your Q contained this:
Output: one line for each of the files
.d...p... path/to/filename.txt
This appears to be one line from your output that is due to the -i option. Here's a resource to help you understand how to interpret each of these lines. If you consult this resource (or read man rsync) you'll understand this line from your question means that the directory (d) listed has a different set of permissions (p) on the destination than it does for the source
2. The -a option you used is meaningful to the outcome of your rsync command:
-a = -rlptgoD
p means preserve permissions; i.e. the same permissions to which your one line output refers. If it can, rsync will change the permissions on the destination to match the permissions on the source. rsync does not transfer a file to accomplish this - it merely changes the permissions. You provided no error messages in your question, so we have to assume that rsync accomplished this permission change without further ado. If that's not the case, please edit your question.
If rsync is unable to change permissions on the destination, you can find more options that will help you overcome this problem. Review man rsync, paying particular attention to the --fake-super (and related) options. This option can be very useful in dealing with (for example) filesystems on NAS devices - which are typically quite different from APFS.
3. FWIW:
The APFS in current use on MacOS is a proprietary pos. Apple is very fond of doing things differently, and make extensive use of metadata in their filesystem. This metadata plays a significant role in various MacOS functions, which means that to preserve that functionality, you must preserve the metadata! Here in particular, rsync has options that support this objective. The metadata that Apple depends on so heavily is encoded in extended attributes (xattr, or the -X option in rsync) and access contol lists (--acls, or the -A option in rsync).
I use a NAS to synchronize some of my user data between Mac systems. My most frequently used rsync commands are these:
$ rsync -rlAXtgoDvi --fake-super /mac/source/folders/ /nas/dest/folders
$ rsync -rlAXtgoDvi --fake-super /nas/source/folders/ /mac/dest/folders
This is quite useful: even though my NAS uses a completely different file system than the Macs, rsync is able to preserve all of the Mac's metadata on the NAS, and then restore it upon arrival at its APFS destination.