Can I write I worked as a referee in a journal in my CV?
Yes, you can do that, but it won't mean a tremendous amount in any evaluation. But probably better to list it than not. And the section you suggest is the correct place for it.
It is immaterial whether you have published there or not, assuming, only, that the journal is reputable.