The documentation for the Reference element applied to an inline MSBuild task says the Include attribute is the path to an assembly to be referenced. This is not working as expected.
During compilation the path is used so the task will compile. But when the task attempts to run it will fail to load the referenced assembly.
The defacto example that several people have posted online about is using the TransformConfig task from $(VSToolsPath)\Web\Microsoft.Web.Publishing.Tasks.dll. Specifying this as the Include of a reference gets around the compiler but when the task is loaded only the GAC is searched.