A Duke by Default - Alyssa Cole

Portia Hobbs from the previous story (and this works alone, there are some references to the previous book but it's not necessary to have read it to get this) gets an apprenticeship with a swordmaker in Edinburgh, Scotland. There she starts to try to help him turn things around and it's all complicated by their feelings for each other.

And then she finds out that he's the heir to a dukedom.

Complicated things make things complicated and make relationships difficult.