But yeah, you could argue he decided to let himself be the scapegoat in order to protect Hawke. Which I don't see someone doing if they didn't love them. There are a lot of ways to interpret it.
I agree and want to present my way of interpreting it.
The best way for Anders to be sure Hawke is not blamed was:
1. Not to involve him in the quest in the first place. Either tell him the truth or at least "I am doing something illegal" part before the ingredient gathering, not after. Hawke is an accessory in this case no matter what.
2. Not to declare that he (Anders) is responsible. Everybody knows Anders relationship with Hawke - Meredith says loud and clear that ties to the Champion is the only reason Anders is still free. And if romanced Anders is living with Hawke for three years now. What are the chances people will believe Hawke is not involved? Heck, Cassandra was sure Hawke was behind everything, where did she get that idea from?
So I don't think Anders made himself a scapegoat to save Hawke. He did it because it was the only way to insure the result he wanted - the Right of Annulment. If he would not confess on the spot mages might not have been blamed (not right away without the investigation, anyway). And so it would be no confrontation he wanted.