Let $R$ be a commutative ring. Let $M$ be an $R$-module with the following property:
For every commutative $R$-algebra $A$ and every $R$-module $N$ the canonical map $\mathrm{Hom}_R(M,N) \otimes_R A \to \mathrm{Hom}_R(M,N \otimes_R A)$ is an isomorphism.
Does this imply that $M$ is finitely generated projective? If not, what happens when we even assume the following property?
For every homomorphism of commutative $R$-algebras $A \to B$ and every $A$-module $N$ the canonical map $\mathrm{Hom}_R(M,N) \otimes_A B \to \mathrm{Hom}_R(M,N \otimes_A B)$ is an isomorphism.
If this is too hard in general, what about explicit examples for $R$?